|
|
@ -46,13 +46,6 @@ if [ "$DISTRO" = "debian" ]; then |
|
|
|
sudo apt upgrade -yqqq |
|
|
|
sudo apt upgrade -yqqq |
|
|
|
echo apt upgrade complete |
|
|
|
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 |
|
|
|
# install curl |
|
|
|
if [ $(dpkg-query -W -f='${Status}' curl 2>/dev/null | grep -c "ok installed") -eq 1 ]; then |
|
|
|
if [ $(dpkg-query -W -f='${Status}' curl 2>/dev/null | grep -c "ok installed") -eq 1 ]; then |
|
|
|
echo curl already installed |
|
|
|
echo curl already installed |
|
|
@ -80,8 +73,6 @@ elif [ "$DISTRO" = "arch" ]; then |
|
|
|
sudo pacman -Syu 1>/dev/null |
|
|
|
sudo pacman -Syu 1>/dev/null |
|
|
|
echo pacman update complete |
|
|
|
echo pacman update complete |
|
|
|
|
|
|
|
|
|
|
|
# todo: detect whether AUR is enabled here and fail if not. might be in /etc/pacman.conf. |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# install curl |
|
|
|
# install curl |
|
|
|
if [ $(sudo pacman -Qs curl >/dev/null | grep -c "local/curl" ) -eq 0 ]; then |
|
|
|
if [ $(sudo pacman -Qs curl >/dev/null | grep -c "local/curl" ) -eq 0 ]; then |
|
|
|
echo curl already installed |
|
|
|
echo curl already installed |
|
|
@ -166,25 +157,12 @@ if [ $(npm --v 2>/dev/null | grep -c "8\.") -eq 1 ]; then |
|
|
|
NPMVERSION=`npm -v` |
|
|
|
NPMVERSION=`npm -v` |
|
|
|
echo npm v$NPMVERSION already installed |
|
|
|
echo npm v$NPMVERSION already installed |
|
|
|
else |
|
|
|
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? |
|
|
|
npm install -g npm # why doesn't the npm install script install the current version? |
|
|
|
fi |
|
|
|
fi |
|
|
|
|
|
|
|
|
|
|
|
# clone the ao-cli repository |
|
|
|
# install ao-cli official current version via npm |
|
|
|
cd ~ |
|
|
|
npm i -g @autonomousorganization/ao-cli |
|
|
|
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 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ao-cli |