Browse Source

added grep install to bootstrap on debian/pi

main
deicidus 2 years ago
parent
commit
2d8521d8ac
  1. 25
      bootstrap.sh

25
bootstrap.sh

@ -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:
# 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
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
if [ $(dpkg-query -W -f='${Status}' git 2>/dev/null | grep -c "ok installed") -eq 1 ]; then
echo grep already installed
@ -96,13 +89,6 @@ elif [ "$DISTRO" = "arch" ]; then
sudo pacman -S curl
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)
elif [ "$DISTRO" = "fedora" ]; then
# update
@ -117,7 +103,7 @@ elif [ "$DISTRO" = "fedora" ]; then
echo "Upgrade Complete"
# install basic dependencies
install_if_needed curl wget git
install_if_needed curl git
elif [ "$DISTRO" = "mac" ]; then
# install homebrew
@ -139,13 +125,6 @@ elif [ "$DISTRO" = "mac" ]; then
sudo apt install -y curl
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
if [ $(dpkg-query -W -f='${Status}' git 2>/dev/null | grep -c "ok installed") -eq 1 ]; then
echo git already installed

Loading…
Cancel
Save