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