From 2eb7da5f53866e7fd71f9e6d1a7de2e1459e7d63 Mon Sep 17 00:00:00 2001 From: pyr0ball Date: Tue, 10 Sep 2024 09:53:52 -0700 Subject: [PATCH 1/3] fixed bashrc echo out on single line --- install.sh | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/install.sh b/install.sh index 278454d..8dd8ed3 100755 --- a/install.sh +++ b/install.sh @@ -393,9 +393,8 @@ userinstall(){ # Check for existing bashrc config, append if missing if [[ $(cat ${HOME}/.bashrc | grep -c 'bashrc.d') == 0 ]] ; then take-backup $HOME/.bashrc - run echo -e "$bashrc_append" >> $HOME/.bashrc && boxborder "bashc.d installed..." || warn "Malformed append on ${lbl}${HOME}/.bashrc${dfl}. Check this file for errors" - run echo -e "$prbl_bashrc" >> $HOME/.bashrc.d/00-prbl.bashrc && boxborder "bashc.d/00-prbl installed..." || warn "Malformed append on ${lbl}${HOME}/.bashrc.d/00-prbl.bashrc${dfl}. Check this file for errors" - fi + echo -e "$bashrc_append" >> $HOME/.bashrc && boxborder "bashc.d installed..." + echo -e "$prbl_bashrc" >> $HOME/.bashrc.d/00-prbl.bashrc && boxborder "bashc.d/00-prbl installed..." # Create the quickinfo cache directory @@ -457,7 +456,7 @@ globalinstall(){ # done if [[ $(cat /home/${selecteduser}/.bashrc | grep -c prbl) == 0 ]] ; then take-backup /home/${selecteduser}/.bashrc - run echo -e "$bashrc_append" >> /home/${selecteduser}/.bashrc && boxborder "bashc.d installed..." || warn "Malformed append on ${lbl}/home/${selecteduser}/.bashrc${dfl}. Check this file for errors" + echo -e "$bashrc_append" >> /home/${selecteduser}/.bashrc && boxborder "bashc.d installed..." || warn "Malformed append on ${lbl}/home/${selecteduser}/.bashrc${dfl}. Check this file for errors" fi run sudo chown -R ${selecteduser}:${selecteduser} ${installdir} if [[ "$bins_missing" == "false" ]] ; then From 5b160666161686096eaff1c38748ec18e5cab11c Mon Sep 17 00:00:00 2001 From: pyr0ball Date: Tue, 10 Sep 2024 10:10:10 -0700 Subject: [PATCH 2/3] fixed single-line echo out on extra installs --- extras/Slipstream.install | 2 +- extras/golang.install | 2 +- install.sh | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/extras/Slipstream.install b/extras/Slipstream.install index 8356d75..7e9a529 100755 --- a/extras/Slipstream.install +++ b/extras/Slipstream.install @@ -152,7 +152,7 @@ dry-run-report(){ install(){ if [ ! -f $HOME/.bashrc.d/70-CodeDog.bashrc ] ; then - run echo -e "$codedog_bashrc" >> $HOME/.bashrc.d/70-CodeDog.bashrc && boxborder "bashc.d/70-CodeDog.bashrc installed..." + echo -e "$codedog_bashrc" >> $HOME/.bashrc.d/70-CodeDog.bashrc && boxborder "bashc.d/70-CodeDog.bashrc installed..." fi export PATH="$PATH:$HOME/devl/CodeDog" # Check for dependent applications and offer to install diff --git a/extras/golang.install b/extras/golang.install index 74f362b..4087645 100755 --- a/extras/golang.install +++ b/extras/golang.install @@ -149,7 +149,7 @@ install(){ run sudo rm -rf /usr/local/go run sudo tar -C /usr/local -xzf $tmp_dir/$golang_current if [ ! -f $HOME/.bashrc.d/11-golang.bashrc ] ; then - run echo -e "$codedog_bashrc" >> $HOME/.bashrc.d/11-golang.bashrc && \ + echo -e "$codedog_bashrc" >> $HOME/.bashrc.d/11-golang.bashrc && \ logger boxborder ".bashrc.d/11-golang.bashrc installed..." fi export PATH=$PATH:/usr/local/go/bin diff --git a/install.sh b/install.sh index 8dd8ed3..3420e47 100755 --- a/install.sh +++ b/install.sh @@ -395,7 +395,7 @@ userinstall(){ take-backup $HOME/.bashrc echo -e "$bashrc_append" >> $HOME/.bashrc && boxborder "bashc.d installed..." echo -e "$prbl_bashrc" >> $HOME/.bashrc.d/00-prbl.bashrc && boxborder "bashc.d/00-prbl installed..." - + fi # Create the quickinfo cache directory #mkdir -p $HOME/.quickinfo From 57d6da462d786746cfd547c5c9e3c3ef1b36fb1c Mon Sep 17 00:00:00 2001 From: pyr0ball Date: Wed, 11 Sep 2024 10:30:08 -0700 Subject: [PATCH 3/3] fixed wan ip get --- lib/skel/.bashrc.d/11-quickinfo.bashrc | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/lib/skel/.bashrc.d/11-quickinfo.bashrc b/lib/skel/.bashrc.d/11-quickinfo.bashrc index e158853..d19f5ee 100755 --- a/lib/skel/.bashrc.d/11-quickinfo.bashrc +++ b/lib/skel/.bashrc.d/11-quickinfo.bashrc @@ -91,7 +91,7 @@ else # Failover if global variable is not defined. Checks for 'functions' in same location echo -e "PRbL functions not defined. Check ~/.bashrc" if [ -f "${BASH_SOURCE[0]%/*}/functions" ] ; then - source $rundir/functions + source ${BASH_SOURCE[0]%/*}/functions else echo -e "local functions file also missing. Some visual elements will be missing" fi @@ -106,7 +106,8 @@ if [[ $(vercomp $functionsrev $prbl_functons_req_ver) == 2 ]] ; then warn "Some features may not work as expected" else if ! vercomp 1 1 ; then - warn "PRbL functions library is older than 1.1.3, please update!" + warn "PRbL functions library is older than 1.1.3 (detection function missing), please update!" + warn "cd $rundir/PRbL ; git stash ; git pull ; cp ./functions $prbl_functions" warn "Some features may not work as expected" fi fi @@ -178,7 +179,8 @@ fi # TODO: optimize this to run after time delay using timestamp in settings set_spinner spinner19 #spin "eval $(wan_ip=$(wget -qO- http://ipecho.net/plain \| xargs echo ))" -spin read -r wan_ip < <(wget -qO- https://ident.me/) +wan_ip=$(wget -qO- http://ipecho.net/plain \| xargs echo ) +#spin read -r wan_ip < <(wget -qO- https://ident.me/) # Checks memory usage mem_usage=$(free -m | grep Mem | awk '{print $3"M/"$2"M"}') @@ -243,7 +245,7 @@ fi ################################ -# Check for release upgrade +# Check for release upgrade on Debian if [ -x /usr/lib/ubuntu-release-upgrader/release-upgrade-motd ]; then if [ -f /var/lib/ubuntu-release-upgrader/release-upgrade-available ] ; then release_upgrade="$(cat /var/lib/ubuntu-release-upgrader/release-upgrade-available)" @@ -329,8 +331,8 @@ for ((i=0; i<"${#adapters[@]}"; i++ )); do if [[ ${ifups[$i]} == up ]] ; then boxline " ${adapters[$i]}: ${cyn}${ips[$i]}${dfl} | ${blu}${macs[$i]}${dfl}" fi - else - boxline " ${adapters[$i]}: ${cyn}${ips[$i]}${dfl} | ${blu}${macs[$i]}${dfl}" + # else + # boxline " ${adapters[$i]}: ${cyn}${ips[$i]}${dfl} | ${blu}${macs[$i]}${dfl}" fi done boxline " WAN IP: ${ylw}${wan_ip}${dfl}"