updated install.sh to just leverage apt/yum with assumed packages needed to setup python3/invoke to run the installer

This commit is contained in:
Blake Harnden 2020-09-26 13:09:33 -07:00
parent a3d2e6dfe3
commit 28daab98dd

View file

@ -3,13 +3,6 @@
# exit on error # exit on error
set -e set -e
# detect os/ver for install type
os=""
if [[ -f /etc/os-release ]]; then
. /etc/os-release
os=${ID}
fi
# parse arguments # parse arguments
dev="" dev=""
verbose="" verbose=""
@ -42,19 +35,23 @@ while getopts "dvlp:" opt; do
done done
shift $((OPTIND - 1)) shift $((OPTIND - 1))
echo "installing CORE for ${os}" # install pre-reqs using yum/apt
case ${os} in if command -v apt &> /dev/null
"ubuntu") then
echo "setup to install CORE using apt"
sudo apt install -y python3-pip python3-venv sudo apt install -y python3-pip python3-venv
;; elif command -v yum &> /dev/null
"centos") then
echo "setup to install CORE using yum"
sudo yum install -y python3-pip sudo yum install -y python3-pip
;; else
*) echo "apt/yum was not found"
echo "unknown OS ID ${os} cannot install" echo "install python3 and invoke to run the automated install"
;; echo "inv -h install"
esac exit 1
fi
# install pip/invoke to run install with provided options
python3 -m pip install --user pipx python3 -m pip install --user pipx
python3 -m pipx ensurepath python3 -m pipx ensurepath
export PATH=$PATH:~/.local/bin export PATH=$PATH:~/.local/bin