Merge branch 'main' of https://github.com/pyr0ball/PRbL-bashrc into develop

This commit is contained in:
pyr0ball 2024-09-22 15:32:36 -07:00
commit e8bf95fd5c
4 changed files with 13 additions and 11 deletions

View file

@ -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

View file

@ -154,7 +154,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

View file

@ -398,11 +398,10 @@ userinstall(){
# Check for existing bashrc config, append if missing
if [[ $(cat ${HOME}/.bashrc | grep -c 'bashrc.d') == 0 ]] ; then
take-backup $HOME/.bashrc
echo -e "$bashrc_append" >> $HOME/.bashrc && boxborder "bashc.d installed..." || warn "Malformed append on ${lbl}${HOME}/.bashrc${dfl}. Check this file for errors"
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"
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
export prbl_functions="${installdir}/functions"
@ -462,7 +461,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

View file

@ -121,7 +121,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
@ -193,7 +194,9 @@ 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- http://ipecho.net/plain \| xargs echo)
#spin read -r wan_ip < <(wget -qO- http://ipecho.net/plain \| xargs echo)
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"}')
@ -258,7 +261,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)"
@ -344,8 +347,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}"