diff --git a/bootstrap.sh b/bootstrap.sh index dba8bbb..63160e4 100755 --- a/bootstrap.sh +++ b/bootstrap.sh @@ -46,13 +46,6 @@ if [ "$DISTRO" = "debian" ]; then sudo apt upgrade -yqqq echo apt upgrade complete - # more cleanup - #sudo apt-get dist-upgrade -yqqq - #sudo apt-get clean -yqqq - #sudo apt-get autoclean -yqqq - - # check for sudo install and fail if not - # install curl if [ $(dpkg-query -W -f='${Status}' curl 2>/dev/null | grep -c "ok installed") -eq 1 ]; then echo curl already installed @@ -80,8 +73,6 @@ elif [ "$DISTRO" = "arch" ]; then sudo pacman -Syu 1>/dev/null echo pacman update complete - # todo: detect whether AUR is enabled here and fail if not. might be in /etc/pacman.conf. - # install curl if [ $(sudo pacman -Qs curl >/dev/null | grep -c "local/curl" ) -eq 0 ]; then echo curl already installed @@ -166,25 +157,12 @@ if [ $(npm --v 2>/dev/null | grep -c "8\.") -eq 1 ]; then NPMVERSION=`npm -v` echo npm v$NPMVERSION already installed else - #curl -L https://www.npmjs.com/install.sh | sh # this line might not be needed npm install -g npm # why doesn't the npm install script install the current version? fi -# clone the ao-cli repository -cd ~ -if find "ao-cli" -mindepth 1 -print -quit 2>/dev/null | grep -q .; then - echo ao-cli git repository already cloned -else - git clone http://git.coalitionofinvisiblecolleges.org:3009/autonomousorganization/ao-cli.git -fi - -# install project dependencies -cd ~/ao-cli +# install ao-cli official current version via npm +npm i -g @autonomousorganization/ao-cli -if [ $(npm list --depth 0 ao-cli | grep -c "@autonomousorganization/ao-cli") -eq 1 ]; then - echo ao-cli node module already installed -else - npm install -fi +echo ao-cli is installed -echo ao-cli is installed \ No newline at end of file +ao-cli \ No newline at end of file