summaryrefslogtreecommitdiff
path: root/Ubuntu
diff options
context:
space:
mode:
authorrahulp132020-08-08 00:32:21 +0530
committerrahulp132020-08-08 00:32:21 +0530
commit131acc72da0b4eb1da74c0faeb103a1512b59e03 (patch)
treea20e63aa6960bd4ff1aeaacc5c4546561704e2f1 /Ubuntu
parentb22d32ed7b2f1f3e0e8a37a0dd7c5310b08e0251 (diff)
downloadeSim-131acc72da0b4eb1da74c0faeb103a1512b59e03.tar.gz
eSim-131acc72da0b4eb1da74c0faeb103a1512b59e03.tar.bz2
eSim-131acc72da0b4eb1da74c0faeb103a1512b59e03.zip
moved error on exit to install section only
Diffstat (limited to 'Ubuntu')
-rwxr-xr-xUbuntu/install-eSim.sh26
1 files changed, 14 insertions, 12 deletions
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): "