prep for optimization refactor
This commit is contained in:
parent
99b66e37d6
commit
dd18013da3
3 changed files with 16 additions and 7 deletions
|
|
@ -187,9 +187,9 @@ userinstall(){
|
|||
export prbl_functions="${installdir}/functions"
|
||||
|
||||
# If all required dependencies are installed, launch initial cache creation
|
||||
if [[ "$bins_missing" == "false" ]] ; then
|
||||
bash $HOME/.bashrc.d/11-quickinfo.bashrc -c
|
||||
fi
|
||||
#if [[ "$bins_missing" == "false" ]] ; then
|
||||
# bash $HOME/.bashrc.d/11-quickinfo.bashrc
|
||||
#fi
|
||||
#clear
|
||||
|
||||
# Download and install any other extras
|
||||
|
|
|
|||
|
|
@ -57,7 +57,8 @@ fi
|
|||
|
||||
# Locate and import settings (shares same name with script apart from file extension)
|
||||
scriptname="${0##*/}"
|
||||
rundir_absolute=$(cd `dirname $0` && pwd)
|
||||
rundir="${0%/*}"
|
||||
rundir_absolute=$(cd $rundir && pwd)
|
||||
settingsfile=$(echo "$rundir_absolute/$scriptname" | sed -E 's/(.*)bashrc/\1settings/')
|
||||
source $settingsfile
|
||||
|
||||
|
|
@ -106,8 +107,9 @@ while getopts ":cdh" opt
|
|||
|
||||
################################
|
||||
|
||||
[[ "$-" == *i* ]] || fail "non-interactive session"
|
||||
|
||||
#if [[ $interactive_only == true ]] ; then
|
||||
# [[ "$-" == *i* ]] || fail "non-interactive session"
|
||||
#fi
|
||||
################################
|
||||
|
||||
# Global parameters pulled from cache file
|
||||
|
|
@ -131,7 +133,9 @@ fi
|
|||
|
||||
# Gets public IP address using opendns
|
||||
# TODO: optimize this to run after time delay using timestamp in settings
|
||||
#spinstart &
|
||||
wan_ip=$(wget -qO- http://ipecho.net/plain | xargs echo)
|
||||
#spinstop
|
||||
|
||||
# Checks memory usage
|
||||
mem_usage=$(free -m | grep Mem | awk '{print $3"M/"$2"M"}')
|
||||
|
|
|
|||
|
|
@ -1,3 +1,8 @@
|
|||
# quickinfo bashrc Preferences
|
||||
|
||||
# Disable run on non-interactive sessions (set true to disable)
|
||||
interactive_only=false
|
||||
|
||||
# Network Adapter Preferences
|
||||
|
||||
# set false to hide network adapters without valid IP's
|
||||
|
|
|
|||
Loading…
Reference in a new issue