From 131acc72da0b4eb1da74c0faeb103a1512b59e03 Mon Sep 17 00:00:00 2001 From: rahulp13 Date: Sat, 8 Aug 2020 00:32:21 +0530 Subject: moved error on exit to install section only --- Ubuntu/install-eSim.sh | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) (limited to 'Ubuntu/install-eSim.sh') diff --git a/Ubuntu/install-eSim.sh b/Ubuntu/install-eSim.sh index 74d59992..32555a14 100755 --- a/Ubuntu/install-eSim.sh +++ b/Ubuntu/install-eSim.sh @@ -18,18 +18,6 @@ # REVISION: Sunday 02 August 2020 01:26 #=============================================================================== -set -e # Set exit option immediately on error -set -E # inherit ERR trap by shell functions - -error_exit() { - echo -e "\n\nError! Kindly resolve above error(s) and try again." - echo -e "\nAborting Installation...\n" -} - -# Trap on function error_exit before exiting on error -trap error_exit ERR - - # All variables goes here config_dir="$HOME/.esim" config_file="config.ini" @@ -38,6 +26,12 @@ ngspiceFlag=0 ## All Functions goes here +error_exit() { + echo -e "\n\nError! Kindly resolve above error(s) and try again." + echo -e "\nAborting Installation...\n" +} + + function createConfigFile { @@ -275,6 +269,14 @@ fi ## Checking flags if [ $option == "--install" ];then + + set -e # Set exit option immediately on error + set -E # inherit ERR trap by shell functions + + # Trap on function error_exit before exiting on error + trap error_exit ERR + + echo "Enter proxy details if you are connected to internet thorugh proxy" echo -n "Is your internet connection behind proxy? (y/n): " -- cgit From a324a0606c1a7e8f9e3f357c85b8062a9c58cb0d Mon Sep 17 00:00:00 2001 From: rahulp13 Date: Sat, 8 Aug 2020 17:24:06 +0530 Subject: auto yes to distutils prompt --- Ubuntu/install-eSim.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Ubuntu/install-eSim.sh') diff --git a/Ubuntu/install-eSim.sh b/Ubuntu/install-eSim.sh index 32555a14..8ce35553 100755 --- a/Ubuntu/install-eSim.sh +++ b/Ubuntu/install-eSim.sh @@ -119,7 +119,7 @@ function installDependency if [[ $(lsb_release -rs) != 16.* ]]; then echo "Installing Distutils......................." - sudo apt-get install python3-distutils + sudo apt-get install -y python3-distutils fi echo "Installing KiCad..........................." -- cgit