|
|
@ -1,4 +1,4 @@ |
|
|
|
# This bash script installs ao-cli and its prerequisites: Node.JS (npm, nvm, node) |
|
|
|
# This bash script installs ao-cli and its prerequisites: Node.JS (npm, nvm, node), as well as curl, grep, and git |
|
|
|
# This script is hosted in the ao-cli repository, so ao-cli can always be installed with: |
|
|
|
# This script is hosted in the ao-cli repository, so ao-cli can always be installed with: |
|
|
|
# curl -L http://git.coalitionofinvisiblecolleges.org/autonomousorganization/ao-cli/raw/branch/main/bootstrap.sh | sh |
|
|
|
# curl -L http://git.coalitionofinvisiblecolleges.org/autonomousorganization/ao-cli/raw/branch/main/bootstrap.sh | sh |
|
|
|
|
|
|
|
|
|
|
@ -60,13 +60,6 @@ if [ "$DISTRO" = "debian" ]; then |
|
|
|
sudo apt install -y curl |
|
|
|
sudo apt install -y curl |
|
|
|
fi |
|
|
|
fi |
|
|
|
|
|
|
|
|
|
|
|
# install wget |
|
|
|
|
|
|
|
if [ $(dpkg-query -W -f='${Status}' wget 2>/dev/null | grep -c "ok installed") -eq 1 ]; then |
|
|
|
|
|
|
|
echo wget already installed |
|
|
|
|
|
|
|
else |
|
|
|
|
|
|
|
sudo apt install -y wget |
|
|
|
|
|
|
|
fi |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# install grep |
|
|
|
# install grep |
|
|
|
if [ $(dpkg-query -W -f='${Status}' git 2>/dev/null | grep -c "ok installed") -eq 1 ]; then |
|
|
|
if [ $(dpkg-query -W -f='${Status}' git 2>/dev/null | grep -c "ok installed") -eq 1 ]; then |
|
|
|
echo grep already installed |
|
|
|
echo grep already installed |
|
|
@ -96,13 +89,6 @@ elif [ "$DISTRO" = "arch" ]; then |
|
|
|
sudo pacman -S curl |
|
|
|
sudo pacman -S curl |
|
|
|
fi |
|
|
|
fi |
|
|
|
|
|
|
|
|
|
|
|
# install wget |
|
|
|
|
|
|
|
if [ $(sudo pacman -Qs wget >/dev/null | grep -c "local/wget" ) -eq 0 ]; then |
|
|
|
|
|
|
|
echo wget already installed |
|
|
|
|
|
|
|
else |
|
|
|
|
|
|
|
sudo pacman -S wget |
|
|
|
|
|
|
|
fi |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# update system and install prereqs (Fedora) |
|
|
|
# update system and install prereqs (Fedora) |
|
|
|
elif [ "$DISTRO" = "fedora" ]; then |
|
|
|
elif [ "$DISTRO" = "fedora" ]; then |
|
|
|
# update |
|
|
|
# update |
|
|
@ -117,7 +103,7 @@ elif [ "$DISTRO" = "fedora" ]; then |
|
|
|
echo "Upgrade Complete" |
|
|
|
echo "Upgrade Complete" |
|
|
|
|
|
|
|
|
|
|
|
# install basic dependencies |
|
|
|
# install basic dependencies |
|
|
|
install_if_needed curl wget git |
|
|
|
install_if_needed curl git |
|
|
|
|
|
|
|
|
|
|
|
elif [ "$DISTRO" = "mac" ]; then |
|
|
|
elif [ "$DISTRO" = "mac" ]; then |
|
|
|
# install homebrew |
|
|
|
# install homebrew |
|
|
@ -139,13 +125,6 @@ elif [ "$DISTRO" = "mac" ]; then |
|
|
|
sudo apt install -y curl |
|
|
|
sudo apt install -y curl |
|
|
|
fi |
|
|
|
fi |
|
|
|
|
|
|
|
|
|
|
|
# install wget |
|
|
|
|
|
|
|
if [ $(dpkg-query -W -f='${Status}' wget 2>/dev/null | grep -c "ok installed") -eq 1 ]; then |
|
|
|
|
|
|
|
echo wget already installed |
|
|
|
|
|
|
|
else |
|
|
|
|
|
|
|
sudo apt install -y wget |
|
|
|
|
|
|
|
fi |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# install git |
|
|
|
# install git |
|
|
|
if [ $(dpkg-query -W -f='${Status}' git 2>/dev/null | grep -c "ok installed") -eq 1 ]; then |
|
|
|
if [ $(dpkg-query -W -f='${Status}' git 2>/dev/null | grep -c "ok installed") -eq 1 ]; then |
|
|
|
echo git already installed |
|
|
|
echo git already installed |
|
|
|