add ubuntu21 option...annoying

This commit is contained in:
paukstelis
2022-02-08 17:43:12 -05:00
parent 2440626b66
commit 2c5f6f155c

View File

@@ -465,10 +465,14 @@ prepare () {
INSTALL=1 INSTALL=1
break break
;; ;;
"Ubuntu") "Ubuntu 20.X")
INSTALL=2 INSTALL=2
break break
;; ;;
"Ubuntu 21.X")
INSTALL=3
break
;;
"Quit") "Quit")
exit 1 exit 1
;; ;;
@@ -493,12 +497,17 @@ prepare () {
cp -p $SCRIPTDIR/config.basic /home/pi/.octoprint/config.yaml cp -p $SCRIPTDIR/config.basic /home/pi/.octoprint/config.yaml
echo 'Connect to your octoprint instance and setup admin user' echo 'Connect to your octoprint instance and setup admin user'
fi fi
if [ $INSTALL -eq 2 ]; then if [ $INSTALL -gt 1 ]; then
echo "Creating OctoBuntu installation equivalent." echo "Creating OctoBuntu installation equivalent."
echo "This will install necessary packages, download and install OctoPrint and setup a base instance on this machine." echo "This will install necessary packages, download and install OctoPrint and setup a base instance on this machine."
#install packages #install packages
apt update > /dev/null apt update > /dev/null
apt -y install make python3.9-venv virtualenv python-is-python3 cmake libjpeg8-dev gcc g++ python3-dev build-essentials python3-setuptools libyaml-dev python3-pip python3-venv if [ $INSTALL -eq 2 ]; then
apt -y install make virtualenv python-is-python3 cmake libjpeg8-dev gcc g++ python3-dev build-essentials python3-setuptools libyaml-dev python3-pip python3-venv
fi
if [ $INSTALL -eq 3 ]; then
apt - y install make python3.9-venv cmake libjpeg8-dev gcc g++ python3-dev build-essential python3-setuptools libyaml-dev python3-pip
fi
echo "Installing OctoPrint in /home/$user/OctoPrint" echo "Installing OctoPrint in /home/$user/OctoPrint"
#make venv #make venv
sudo -u $user python3 -m venv /home/$user/OctoPrint sudo -u $user python3 -m venv /home/$user/OctoPrint