diff options
author | Rahul P | 2020-08-08 20:25:41 +0530 |
---|---|---|
committer | GitHub | 2020-08-08 20:25:41 +0530 |
commit | ac223c4a69c701ad0a247401acdc48b8b6b6dba6 (patch) | |
tree | 6b3d022ba7b72a0f5ca882ebbae75a463a6d7e19 /Ubuntu/install-eSim.sh | |
parent | 3d86dae3fcdc85b23012a5c347fa8f9abe0c4f40 (diff) | |
parent | a324a0606c1a7e8f9e3f357c85b8062a9c58cb0d (diff) | |
download | eSim-ac223c4a69c701ad0a247401acdc48b8b6b6dba6.tar.gz eSim-ac223c4a69c701ad0a247401acdc48b8b6b6dba6.tar.bz2 eSim-ac223c4a69c701ad0a247401acdc48b8b6b6dba6.zip |
Merge pull request #158 from rahulp13/installers
auto yes prompt; error-exit for install section; manual doc update
Diffstat (limited to 'Ubuntu/install-eSim.sh')
-rwxr-xr-x | Ubuntu/install-eSim.sh | 28 |
1 files changed, 15 insertions, 13 deletions
diff --git a/Ubuntu/install-eSim.sh b/Ubuntu/install-eSim.sh index 74d59992..8ce35553 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 { @@ -125,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..........................." @@ -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): " |