Added new preventions to provide robust installation

This commit is contained in:
Yasin Kaya 2020-11-25 17:06:15 +03:00
parent a9c531a576
commit c037d1e5f4

View File

@ -67,16 +67,22 @@ colored_echo "Checking requiremments..."
colored_echo "Installing python3 if it is required..." colored_echo "Installing python3 if it is required..."
if ! [ -x "$(command -v python3)" ]; then if ! [ -x "$(command -v python3)" ]; then
sudo apt-get install python3 -y sudo apt-get install python3 -y
if [[ $? -ne 0 ]]; then colored_echo "Process failed" ${RED}; exit 1; fi
fi fi
colored_echo "Installing pip3 if it is required..." colored_echo "Installing pip3 if it is required..."
if ! [ -x "$(command -v pip3)" ]; then if ! [ -x "$(command -v pip3)" ]; then
sudo apt-get install python3-pip -y sudo apt-get install python3-pip -y
if [[ $? -ne 0 ]]; then colored_echo "Process failed" ${RED}; exit 1; fi
fi fi
colored_echo "Installing or upgrading atcom if it is required..." colored_echo "Installing or upgrading atcom if it is required..."
pip3 install -U atcom pip3 install -U atcom
if [[ $? -ne 0 ]]; then colored_echo "Process failed" ${RED}; exit 1; fi
source ~/.profile source ~/.profile
if [[ $? -ne 0 ]]; then colored_echo "Process failed" ${RED}; exit 1; fi
colored_echo "Downloading setup files..." colored_echo "Downloading setup files..."
@ -92,6 +98,7 @@ if [[ $? -ne 0 ]]; then colored_echo "Download failed" ${RED}; exit 1; fi
colored_echo "ppp and wiringpi (gpio tool) installing..." colored_echo "ppp and wiringpi (gpio tool) installing..."
apt-get install ppp wiringpi -y apt-get install ppp wiringpi -y
if [[ $? -ne 0 ]]; then colored_echo "Process failed" ${RED}; exit 1; fi
colored_echo "What is your carrier APN?" colored_echo "What is your carrier APN?"
read carrierapn read carrierapn