uncommented non-interactive trap after removing cache support
This commit is contained in:
parent
259a7e87cb
commit
74c83516c8
1 changed files with 3 additions and 14 deletions
|
|
@ -55,10 +55,10 @@ else
|
||||||
echo -e "PRbL functions not defined. Check ~/.bashrc"
|
echo -e "PRbL functions not defined. Check ~/.bashrc"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Locate and import settings (shares same name with script apart from file extension)
|
||||||
scriptname="${0##*/}"
|
scriptname="${0##*/}"
|
||||||
rundir_absolute=$(cd `dirname $0` && pwd)
|
rundir_absolute=$(cd `dirname $0` && pwd)
|
||||||
settingsfile=$(echo "$rundir_absolute/$scriptname" | sed -E 's/(.*)bashrc/\1settings/')
|
settingsfile=$(echo "$rundir_absolute/$scriptname" | sed -E 's/(.*)bashrc/\1settings/')
|
||||||
|
|
||||||
source $settingsfile
|
source $settingsfile
|
||||||
|
|
||||||
# check PRbL functions version
|
# check PRbL functions version
|
||||||
|
|
@ -78,14 +78,10 @@ fi
|
||||||
# running this script with an invalid argument
|
# running this script with an invalid argument
|
||||||
|
|
||||||
read -r -d '' usage << EOF
|
read -r -d '' usage << EOF
|
||||||
$scriptname [-h] [-c] [-d] -- Displays information relevent to the IDSS system upon login
|
$scriptname [-h] -- Displays information relevent to the system upon login
|
||||||
|
|
||||||
Usage:
|
Usage:
|
||||||
-h show this help text
|
-h show this help text
|
||||||
-c Pulls new information requiring more time, then stores
|
|
||||||
it to the cache file before running
|
|
||||||
-d Run using information stored in ${cache}
|
|
||||||
|
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
################################
|
################################
|
||||||
|
|
@ -98,10 +94,6 @@ while getopts ":cdh" opt
|
||||||
h) echo "$usage"
|
h) echo "$usage"
|
||||||
exit
|
exit
|
||||||
;;
|
;;
|
||||||
c) quickinfo-cache
|
|
||||||
;;
|
|
||||||
d)
|
|
||||||
;;
|
|
||||||
:)
|
:)
|
||||||
;;
|
;;
|
||||||
\?) printf "illegal option: -%s\n" "$OPTARG" >&2
|
\?) printf "illegal option: -%s\n" "$OPTARG" >&2
|
||||||
|
|
@ -114,10 +106,7 @@ while getopts ":cdh" opt
|
||||||
|
|
||||||
################################
|
################################
|
||||||
|
|
||||||
# Set to only run on interactive sessions (Disabled as cache
|
[[ "$-" == *i* ]] || fail "non-interactive session"
|
||||||
# generation is non-interactive, so this would cause outdated
|
|
||||||
# information to be displayed)
|
|
||||||
#[[ "$-" == *i* ]] || fail "non-interactive session"
|
|
||||||
|
|
||||||
################################
|
################################
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue