#!/bin/bash -li # Makes the shell login and interactive echo " Development for po-util ended in May 2020 and it is no longer maintained. In the summer of 2020, neopo, a Python replacement for po-util was created with the goals of better compatibilty with official Particle tools, portability, maintainablilty, and ease of use. Please use neopo for all future local Particle development needs: https://neopo.xyz If you are looking for support please use the Particle forum or open an issue in the neopo repository on GitHub: https://community.particle.io https://github.com/nrobinson2000/neopo " exit echo " Are you ready to install po-util? Please be sure to follow any prompts or instructions during the installation process." read -rp "ENTER / CTRL-C: " echo " Continuing installation... " if [[ "$USER" != "${USER/ /}" ]]; then echo "$(tput setaf 1)$(tput bold)WARNING: Your username contains space(s), something which is not compatible for po.$(tput sgr0)" exit fi if alias po &>/dev/null ; then echo "$(tput setaf 1)$(tput bold)WARNING: You have an alias named 'po'. Use 'unalias po' to remove the alias.$(tput sgr0)" exit fi if [[ $(uname -s) == "Darwin" ]]; then if hash brew 2>/dev/null; then echo "Homebrew is installed. Continuing..." else /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" fi brew update brew tap nrobinson2000/po brew install po po install fi if [[ $(uname -s) == "Linux" ]]; then if [ -f /.dockerenv ]; then curl -fsSLo /usr/local/share/po-common https://raw.githubusercontent.com/nrobinson2000/po/master/share/po-common curl -fsSLo /usr/local/share/po-docker https://raw.githubusercontent.com/nrobinson2000/po/master/share/po-docker curl -fsSLo /usr/local/bin/po https://raw.githubusercontent.com/nrobinson2000/po/master/bin/po chmod +x /usr/local/bin/po else sudo curl -fsSLo /usr/local/share/po-common https://raw.githubusercontent.com/nrobinson2000/po/master/share/po-common sudo curl -fsSLo /usr/local/share/po-linux https://raw.githubusercontent.com/nrobinson2000/po/master/share/po-linux sudo curl -fsSLo /usr/local/bin/po https://raw.githubusercontent.com/nrobinson2000/po/master/bin/po sudo chmod +x /usr/local/bin/po fi po install fi echo "po-util has been installed on your system. If you are unsure about how to start with po-util please check out the quickstart guide: https://docs.po-util.com/quick-start.html "