From c037d1e5f405623474255c77570013db3c574a34 Mon Sep 17 00:00:00 2001 From: Yasin Kaya Date: Wed, 25 Nov 2020 17:06:15 +0300 Subject: [PATCH] Added new preventions to provide robust installation --- install.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/install.sh b/install.sh index ea8ee18..cbac3cb 100755 --- a/install.sh +++ b/install.sh @@ -67,16 +67,22 @@ colored_echo "Checking requiremments..." colored_echo "Installing python3 if it is required..." if ! [ -x "$(command -v python3)" ]; then sudo apt-get install python3 -y + if [[ $? -ne 0 ]]; then colored_echo "Process failed" ${RED}; exit 1; fi fi colored_echo "Installing pip3 if it is required..." if ! [ -x "$(command -v pip3)" ]; then sudo apt-get install python3-pip -y + if [[ $? -ne 0 ]]; then colored_echo "Process failed" ${RED}; exit 1; fi fi colored_echo "Installing or upgrading atcom if it is required..." + pip3 install -U atcom +if [[ $? -ne 0 ]]; then colored_echo "Process failed" ${RED}; exit 1; fi + source ~/.profile +if [[ $? -ne 0 ]]; then colored_echo "Process failed" ${RED}; exit 1; fi 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..." 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?" read carrierapn