From 350613d86545ac9f00f7a65a003a8afdcb544b97 Mon Sep 17 00:00:00 2001 From: pyr0ball Date: Fri, 9 Jun 2023 09:47:40 -0700 Subject: [PATCH 01/15] removed extra sources check --- extras/Slipstream.install | 3 ++- install.sh | 9 --------- 2 files changed, 2 insertions(+), 10 deletions(-) diff --git a/extras/Slipstream.install b/extras/Slipstream.install index 207a52a..4fa910e 100755 --- a/extras/Slipstream.install +++ b/extras/Slipstream.install @@ -1,6 +1,7 @@ #!/bin/bash # CodeDog Bootstrap installer script - +# To run this script without cloning or downloading anything: +# bash <(curl -ks 'https://github.com/pyr0ball/PRbL-bashrc/raw/main/extras/Slipstream.install') # Bash expansions to get the name and location of this script when run scriptname="${BASH_SOURCE[0]##*/}" rundir="${BASH_SOURCE[0]%/*}" diff --git a/install.sh b/install.sh index 0314b74..fbfb62a 100755 --- a/install.sh +++ b/install.sh @@ -339,15 +339,6 @@ userinstall(){ # Create install directory under user's home directory run mkdir -p ${installdir} - # Check if functions already exist, and check if functions are out of date - if [ -f ${installdir}/functions ] ; then - # if functions are out of date, remove before installing new version - local installerfrev=$(cat ${rundir}/functions | grep functionsrev ) - if [[ $(vercomp ${installerfrev##*=} $installer_functionsrev ) == 2 ]] ; then - run rm ${installdir}/functions - fi - fi - # Copy functions first install-functions From 3e62dc51cd43d444084c325446294ded5de9bf2b Mon Sep 17 00:00:00 2001 From: pyr0ball Date: Fri, 9 Jun 2023 16:02:58 -0700 Subject: [PATCH 02/15] added dependency check to install --- extras/golang.install | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/extras/golang.install b/extras/golang.install index 6c2e6fd..24775da 100644 --- a/extras/golang.install +++ b/extras/golang.install @@ -93,7 +93,24 @@ dry-run-report(){ } install(){ - local _golang_html=$(curl -ks "https://go.dev/dl/" | grep linux-amd64 | grep 1.19 | head -n 1) + if ! check-deps ; then + warn "Some of the utilities needed by this script are missing" + boxlinelog "Missing utilities:" + boxlinelog "${bins_missing[@]}" + boxlinelog "Would you like to install them? (this will require root password)" + utilsmissing_menu=( + "$(boxline "${green_check} Yes")" + "$(boxline "${red_x} No")" + ) + case `select_opt "${utilsmissing_menu[@]}"` in + 0) boxlinelog "${grn}Installing dependencies...${dfl}" + install-deps + ;; + 1) warn "Dependent Utilities missing: $bins_missing" ;; + esac + fi + + local _golang_html=$(/usr/bin/curl -ks "https://go.dev/dl/" | grep linux-amd64 | grep 1.19 | head -n 1) local golang_current=$(strip-html-tags "$_golang_html") #golang_current=$(echo "$golang_current" | sed -e 's/^[[:space:]]*//' -e 's/[[:space:]]*$//') export tmp_dir=`mktemp -d /tmp/selfextract.XXXXXX` From 2ac709f93ca1a781a085906aecb17791a5027d87 Mon Sep 17 00:00:00 2001 From: pyr0ball Date: Fri, 9 Jun 2023 16:03:21 -0700 Subject: [PATCH 03/15] removed certain checks that are now handled by run() --- install.sh | 36 +++++++++++++++++++++--------------- 1 file changed, 21 insertions(+), 15 deletions(-) diff --git a/install.sh b/install.sh index fbfb62a..3d5da69 100755 --- a/install.sh +++ b/install.sh @@ -203,7 +203,7 @@ install-functions(){ take-backup(){ name="$1" - if [[ $update_run != true ]] ; then + # if [[ $update_run != true ]] ; then # Check if a backup file or symbolic link already exists if [[ -e "$name.bak" || -L "$name.bak" ]]; then run boxline " $name.bak backup already exists" @@ -219,11 +219,11 @@ take-backup(){ # Copy the file to the backup file with preservation of file attributes run cp -p "$name" "$backup_name" # Add the original file to the list of backup files - backup_files+=("$name") + run boxline " $name.bak backup already exists" # Log the original file name to the backup file list file run echo "$name" >> "$rundir/backup_files.list" fi - fi + # fi } restore-backup(){ @@ -232,7 +232,7 @@ restore-backup(){ run cp "$file".bak $file run echo "$file is restored" done - backup_files=() + run boxline " $name.bak backup already exists" if [ -f $rundir/backup_files.list ] ; then run rm $rundir/backup_files.list fi @@ -306,13 +306,13 @@ install-extras(){ for extra in "${_extras[@]}"; do # If the selected user is set to true if [[ "${result[idx]}" == "true" ]] ; then - if [[ $dry_run != true ]] ; then + # if [[ $dry_run != true ]] ; then run "${escape_dir}/extras/$extra -i" - else - dry_run=false - run "${escape_dir}/extras/$extra -D" - dry_run=true - fi + # else + # dry_run=false + # run "${escape_dir}/extras/$extra -D" + # dry_run=true + # fi fi done } @@ -350,11 +350,17 @@ userinstall(){ warn "Some of the utilities needed by this script are missing" boxlinelog "Missing utilities:" boxlinelog "${bins_missing[@]}" - boxlinelog "After this installer completes, run:" - boxseparator - echo -en "\n${lbl}sudo apt install -y ${bins_missing[@]}\n${dfl}" - boxborder "Press 'Enter' key when ready to proceed" - read proceed + boxlinelog "Would you like to install them? (this will require root password)" + utilsmissing_menu=( + "$(boxline "${green_check} Yes")" + "$(boxline "${red_x} No")" + ) + case `select_opt "${utilsmissing_menu[@]}"` in + 0) boxlinelog "${grn}Installing dependencies...${dfl}" + install-deps + ;; + 1) warn "Dependent Utilities missing: $bins_missing" ;; + esac fi # Check for and parse the installed vim version From f75c4c99ab5cb736140d66299c3ec327e4cd02ae Mon Sep 17 00:00:00 2001 From: pyr0ball Date: Thu, 15 Jun 2023 01:51:06 -0700 Subject: [PATCH 04/15] migrated Slipstream dependency installs to new package management --- extras/Slipstream.install | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/extras/Slipstream.install b/extras/Slipstream.install index 4fa910e..5c65b82 100755 --- a/extras/Slipstream.install +++ b/extras/Slipstream.install @@ -57,12 +57,12 @@ check-deps(){ done pybin=$(which python3) if [ -z $pybin ] ; then - run sudo apt-get install -y python3 python3-pip + run install-packages python3 python3-pip # TODO: make a universal package install function fi pipbin=$(which pip3) if [ -z $pipbin ] ; then - run sudo apt-get install -y python3-pip + run install-packages python3-pip fi for pkg in ${pip_packages[@]} ; do pippkg_installed=$(pip list | grep -F $pkg ; echo $?) @@ -89,8 +89,8 @@ check-deps(){ install-deps(){ logger echo "Installing packages $sys_packages" - for _package in $sys_packages ; do - run sudo apt-get install -y $_package + for _package in ${sys_packages[@]} ; do + run install-packages $_package done if [ -f ${rundir}/requirements.txt ] ; then pip install -y ${rundir}/requirements.txt From d0b36bda5433a35dcd8ff1f089e781d7eb709813 Mon Sep 17 00:00:00 2001 From: pyr0ball Date: Thu, 15 Jun 2023 01:52:32 -0700 Subject: [PATCH 05/15] updated extras run function to handle dryruns better --- PRbL | 2 +- install.sh | 30 ++++++++++++++++++------------ 2 files changed, 19 insertions(+), 13 deletions(-) diff --git a/PRbL b/PRbL index c03ad9e..7c13e1b 160000 --- a/PRbL +++ b/PRbL @@ -1 +1 @@ -Subproject commit c03ad9e03328fe3f915b5995fc754e64b17c515d +Subproject commit 7c13e1b9d3c00caf7a26a991150384955e78e540 diff --git a/install.sh b/install.sh index 3d5da69..110eb41 100755 --- a/install.sh +++ b/install.sh @@ -292,27 +292,33 @@ install-deps(){ } install-extras(){ - _extras=() - extra_installs=$(ls ${escape_dir}/extras/) - for file in $extra_installs ; do - _extras+=("$file") - done + _extras=($(ls ${escape_dir}/extras/)) + # extra_installs=$(ls ${escape_dir}/extras/) + # for file in $extra_installs ; do + # _extras+=("$file") + # done boxborder "Which extras should be installed?" - multiselect result _extras "false" + for each in {1..${#_extras[@]}} ; do + preselect+=("false") + done + multiselect result _extras preselect # For each extra, compare input choice and apply installs idx=0 for extra in "${_extras[@]}"; do # If the selected user is set to true if [[ "${result[idx]}" == "true" ]] ; then - # if [[ $dry_run != true ]] ; then + if [[ $dry_run != true ]] ; then + boxline "running extra $extra" run "${escape_dir}/extras/$extra -i" - # else - # dry_run=false - # run "${escape_dir}/extras/$extra -D" - # dry_run=true - # fi + else + dry_run=false + run "${escape_dir}/extras/$extra -D" + dry_run=true + fi + # else + # echo "index for $extra is ${result[idx]}" fi done } From 198ea05975915435ab27a2c1f34c49cd2637adc6 Mon Sep 17 00:00:00 2001 From: pyr0ball Date: Thu, 15 Jun 2023 02:01:47 -0700 Subject: [PATCH 06/15] added fallback utils for fetching functions --- extras/Slipstream.install | 12 +++++++++++- install.sh | 16 ++++++++++++---- 2 files changed, 23 insertions(+), 5 deletions(-) diff --git a/extras/Slipstream.install b/extras/Slipstream.install index 5c65b82..2287412 100755 --- a/extras/Slipstream.install +++ b/extras/Slipstream.install @@ -13,7 +13,17 @@ else if [ -f ${rundir}/functions ] ; then source ${rundir}/functions else - source <(curl -ks 'https://raw.githubusercontent.com/pyr0ball/PRbL/master/functions') + # Iterate through get commands and fall back on next if unavailable + if command -v curl >/dev/null 2>&1; then + source <(curl -ks 'https://raw.githubusercontent.com/pyr0ball/PRbL/master/functions') + elif command -v wget >/dev/null 2>&1; then + source <(wget -qO- 'https://raw.githubusercontent.com/pyr0ball/PRbL/master/functions') + elif command -v fetch >/dev/null 2>&1; then + source <(fetch -qo- 'https://raw.githubusercontent.com/pyr0ball/PRbL/master/functions') + else + echo "Error: curl, wget, and fetch commands are not available. Please install one to retrieve PRbL functions." + exit 1 + fi fi fi diff --git a/install.sh b/install.sh index 110eb41..ab431bb 100755 --- a/install.sh +++ b/install.sh @@ -11,19 +11,27 @@ scripttitle="Pyr0ball's Reductive Bash Library Installer - v$VERSION" scriptname="${BASH_SOURCE[0]##*/}" rundir="${BASH_SOURCE[0]%/*}" - -# Source PRbL functions from installer directory # Source PRbL Functions locally or retrieve from online -# TODO: Add version check to this if [ ! -z $prbl_functions ] ; then source $prbl_functions else if [ -f ${rundir}/functions ] ; then source ${rundir}/functions else - source <(curl -ks 'https://raw.githubusercontent.com/pyr0ball/PRbL/master/functions') + # Iterate through get commands and fall back on next if unavailable + if command -v curl >/dev/null 2>&1; then + source <(curl -ks 'https://raw.githubusercontent.com/pyr0ball/PRbL/master/functions') + elif command -v wget >/dev/null 2>&1; then + source <(wget -qO- 'https://raw.githubusercontent.com/pyr0ball/PRbL/master/functions') + elif command -v fetch >/dev/null 2>&1; then + source <(fetch -qo- 'https://raw.githubusercontent.com/pyr0ball/PRbL/master/functions') + else + echo "Error: curl, wget, and fetch commands are not available. Please install one to retrieve PRbL functions." + exit 1 + fi fi fi + rundir_absolute=$(pushd $rundir ; pwd ; popd) escape_dir=$(printf %q "${rundir_absolute}") logfile="${rundir}/${pretty_date}_${scriptname}.log" From 4d51caf31673a3912800082b6ddef157fccc7d7b Mon Sep 17 00:00:00 2001 From: pyr0ball Date: Thu, 15 Jun 2023 02:30:19 -0700 Subject: [PATCH 07/15] fixed legacy urls in fallbacks, added better dry run handling of dependencies --- extras/Slipstream.install | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/extras/Slipstream.install b/extras/Slipstream.install index 2287412..811134b 100755 --- a/extras/Slipstream.install +++ b/extras/Slipstream.install @@ -15,11 +15,11 @@ else else # Iterate through get commands and fall back on next if unavailable if command -v curl >/dev/null 2>&1; then - source <(curl -ks 'https://raw.githubusercontent.com/pyr0ball/PRbL/master/functions') + source <(curl -ks 'https://raw.githubusercontent.com/pyr0ball/PRbL/main/functions') elif command -v wget >/dev/null 2>&1; then - source <(wget -qO- 'https://raw.githubusercontent.com/pyr0ball/PRbL/master/functions') + source <(wget -qO- 'https://raw.githubusercontent.com/pyr0ball/PRbL/main/functions') elif command -v fetch >/dev/null 2>&1; then - source <(fetch -qo- 'https://raw.githubusercontent.com/pyr0ball/PRbL/master/functions') + source <(fetch -qo- 'https://raw.githubusercontent.com/pyr0ball/PRbL/main/functions') else echo "Error: curl, wget, and fetch commands are not available. Please install one to retrieve PRbL functions." exit 1 @@ -98,7 +98,7 @@ check-deps(){ } install-deps(){ - logger echo "Installing packages $sys_packages" + logger echo "Installing packages: $sys_packages" for _package in ${sys_packages[@]} ; do run install-packages $_package done @@ -106,21 +106,24 @@ install-deps(){ pip install -y ${rundir}/requirements.txt else if [ ! -z $pip_packages ] ; then - pip install -y ${pip_packages[@]} + pip install ${pip_packages[@]} fi fi for _package in $prbl_packages ; do if [ -f ${rundir}/$_package ] ; then if [[ $dry_run != true ]] ; then - bash "${rundir}/$_package -i" + boxline "running extra $extra" + run "${rundir}/$_package -i" else - bash "${rundir}/$_package -D" + dry_run=false + run "${rundir}/$_package -D" + dry_run=true fi else if [[ $dry_run != true ]] ; then - run-from-url https://raw.githubusercontent.com/pyr0ball/PRbL-bashrc/master/extras/$_package -i + run-from-url https://raw.githubusercontent.com/pyr0ball/PRbL-bashrc/main/extras/$_package -i else - run-from-url https://raw.githubusercontent.com/pyr0ball/PRbL-bashrc/master/extras/$_package -D + run-from-url https://raw.githubusercontent.com/pyr0ball/PRbL-bashrc/main/extras/$_package -D fi fi done @@ -152,9 +155,9 @@ install(){ if ! check-deps ; then warn "Some of the utilities needed by this install are missing" boxtop - logger echo -e "Missing utilities:" + logger boxline "Missing utilities:" for bin in ${bins_missing[@]} ; do - logger echo -e "${bins_missing[$bin]}" + logger boxline "$bin" done boxbottom boxborder "Would you like to install them? (this will require root password)" From 9b43c9a3f9030bd7ec54b3a4add74d7e41bd2c46 Mon Sep 17 00:00:00 2001 From: pyr0ball Date: Thu, 15 Jun 2023 02:31:33 -0700 Subject: [PATCH 08/15] added more robust functions retrieval --- extras/golang.install | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/extras/golang.install b/extras/golang.install index 24775da..f243eec 100644 --- a/extras/golang.install +++ b/extras/golang.install @@ -15,7 +15,21 @@ export PATH=\$PATH:/usr/local/go/bin if [ ! -z $prbl_functions ] ; then source $prbl_functions else - source <(curl -ks 'https://raw.githubusercontent.com/pyr0ball/PRbL/master/functions') + if [ -f ${rundir}/functions ] ; then + source ${rundir}/functions + else + # Iterate through get commands and fall back on next if unavailable + if command -v curl >/dev/null 2>&1; then + source <(curl -ks 'https://raw.githubusercontent.com/pyr0ball/PRbL/main/functions') + elif command -v wget >/dev/null 2>&1; then + source <(wget -qO- 'https://raw.githubusercontent.com/pyr0ball/PRbL/main/functions') + elif command -v fetch >/dev/null 2>&1; then + source <(fetch -qo- 'https://raw.githubusercontent.com/pyr0ball/PRbL/main/functions') + else + echo "Error: curl, wget, and fetch commands are not available. Please install one to retrieve PRbL functions." + exit 1 + fi + fi fi logfile="${rundir}/${pretty_date}_${scriptname}.log" From bd5504dbe1f287215ef0335ca3b845ff8d8274a7 Mon Sep 17 00:00:00 2001 From: pyr0ball Date: Thu, 15 Jun 2023 02:32:42 -0700 Subject: [PATCH 09/15] renamed branch from master to main --- install.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/install.sh b/install.sh index ab431bb..a03ac2a 100755 --- a/install.sh +++ b/install.sh @@ -20,11 +20,11 @@ else else # Iterate through get commands and fall back on next if unavailable if command -v curl >/dev/null 2>&1; then - source <(curl -ks 'https://raw.githubusercontent.com/pyr0ball/PRbL/master/functions') + source <(curl -ks 'https://raw.githubusercontent.com/pyr0ball/PRbL/main/functions') elif command -v wget >/dev/null 2>&1; then - source <(wget -qO- 'https://raw.githubusercontent.com/pyr0ball/PRbL/master/functions') + source <(wget -qO- 'https://raw.githubusercontent.com/pyr0ball/PRbL/main/functions') elif command -v fetch >/dev/null 2>&1; then - source <(fetch -qo- 'https://raw.githubusercontent.com/pyr0ball/PRbL/master/functions') + source <(fetch -qo- 'https://raw.githubusercontent.com/pyr0ball/PRbL/main/functions') else echo "Error: curl, wget, and fetch commands are not available. Please install one to retrieve PRbL functions." exit 1 @@ -204,7 +204,7 @@ install-functions(){ if [ -f ${rundir}/PRbL/functions ] ; then install-file ${rundir}/PRbL/functions ${installdir} else - curl -ks 'https://raw.githubusercontent.com/pyr0ball/PRbL/master/functions' > ${rundir}/functions + curl -ks 'https://raw.githubusercontent.com/pyr0ball/PRbL/main/functions' > ${rundir}/functions install-file ${rundir}/functions ${installdir} fi } @@ -524,7 +524,7 @@ update(){ run git stash -m "$pretty_date stashing changes before update to latest" run git fetch && run git pull --recurse-submodules pushd PRbL - run git checkout master + run git checkout main run git pull popd install From 3c7999ff2cb436465bd94f748c0082731d12306c Mon Sep 17 00:00:00 2001 From: pyr0ball Date: Thu, 15 Jun 2023 02:34:16 -0700 Subject: [PATCH 10/15] Installer v2.3.4 - iterated minor version --- install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install.sh b/install.sh index a03ac2a..9130a92 100755 --- a/install.sh +++ b/install.sh @@ -4,7 +4,7 @@ ################################################################### # initial vars -VERSION=2.3.3 +VERSION=2.3.4 scripttitle="Pyr0ball's Reductive Bash Library Installer - v$VERSION" # Bash expansions to get the name and location of this script when run From f2fd4a8f6dbc86756689ad039424a4751db6693c Mon Sep 17 00:00:00 2001 From: pyr0ball Date: Thu, 15 Jun 2023 02:35:15 -0700 Subject: [PATCH 11/15] updated to lates functions --- PRbL | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PRbL b/PRbL index 7c13e1b..2fac6ba 160000 --- a/PRbL +++ b/PRbL @@ -1 +1 @@ -Subproject commit 7c13e1b9d3c00caf7a26a991150384955e78e540 +Subproject commit 2fac6ba3a335a89acc07287928446bd6b92169d1 From 2d534cea227e4e9be1700d423c62f71238ff2f47 Mon Sep 17 00:00:00 2001 From: pyr0ball Date: Thu, 15 Jun 2023 02:41:50 -0700 Subject: [PATCH 12/15] added filter to ignore logs in extras install --- install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install.sh b/install.sh index 9130a92..4d5151a 100755 --- a/install.sh +++ b/install.sh @@ -300,7 +300,7 @@ install-deps(){ } install-extras(){ - _extras=($(ls ${escape_dir}/extras/)) + _extras=($(ls ${escape_dir}/extras/ | grep -v '*\.log' )) # extra_installs=$(ls ${escape_dir}/extras/) # for file in $extra_installs ; do # _extras+=("$file") From bc20abe270669d4520eebc6b66e762c1c5f047c0 Mon Sep 17 00:00:00 2001 From: pyr0ball Date: Thu, 15 Jun 2023 02:43:04 -0700 Subject: [PATCH 13/15] fixed permissions on golang install --- extras/golang.install | 0 1 file changed, 0 insertions(+), 0 deletions(-) mode change 100644 => 100755 extras/golang.install diff --git a/extras/golang.install b/extras/golang.install old mode 100644 new mode 100755 From 1fcea7daca9f027ef8397f052d7049630d004df7 Mon Sep 17 00:00:00 2001 From: pyr0ball Date: Thu, 15 Jun 2023 03:00:50 -0700 Subject: [PATCH 14/15] added check to prevent golang attempting install if already present --- extras/golang.install | 26 ++++++++++++++++++++++---- 1 file changed, 22 insertions(+), 4 deletions(-) diff --git a/extras/golang.install b/extras/golang.install index f243eec..74f362b 100755 --- a/extras/golang.install +++ b/extras/golang.install @@ -6,6 +6,7 @@ scriptname="${BASH_SOURCE[0]##*/}" script_title="${grn}Go${blu}la${red}n${ylw}g${dfl}" rundir="${BASH_SOURCE[0]%/*}" sys_arch=$(uname -m) +req_go_ver="1.19" golang_bashrc="# Golang system path setup export PATH=\$PATH:/usr/local/go/bin @@ -77,6 +78,17 @@ check-deps(){ fi } +check-go(){ + if [[ -x /usr/bin/go ]] ; then + # TODO: Add version checking rather than just whether the binary is executible + #inst_go_ver=$(/usr/bin/go version | awl {'print $3'} | cut -c 3-) + #if [[ $(vercomp )]] + return 0 + else + return 1 + fi +} + install-deps(){ logger echo "Installing packages $sys_packages" run "for $_package in $sys_packages ; do sudo apt-get install -y $_package ; done" @@ -107,6 +119,10 @@ dry-run-report(){ } install(){ + if check-go ; then + boxline "golang already installed!" + return 0 + fi if ! check-deps ; then warn "Some of the utilities needed by this script are missing" boxlinelog "Missing utilities:" @@ -124,22 +140,24 @@ install(){ esac fi - local _golang_html=$(/usr/bin/curl -ks "https://go.dev/dl/" | grep linux-amd64 | grep 1.19 | head -n 1) + local _golang_html=$(/usr/bin/curl -ks "https://go.dev/dl/" | grep $sys_arch | grep $req_go_ver | head -n 1) local golang_current=$(strip-html-tags "$_golang_html") #golang_current=$(echo "$golang_current" | sed -e 's/^[[:space:]]*//' -e 's/[[:space:]]*$//') export tmp_dir=`mktemp -d /tmp/selfextract.XXXXXX` + logger boxborder "Pulling golang v$req_go_ver for installation" run wget "https://go.dev/dl/${golang_current}" -O $tmp_dir/$golang_current 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 && \ - boxborder ".bashrc.d/11-golang.bashrc installed..." + logger boxborder ".bashrc.d/11-golang.bashrc installed..." fi export PATH=$PATH:/usr/local/go/bin - if [ ! -f /usr/bin/go ] ; then + if [ ! -x /usr/bin/go ] ; then run sudo ln -s /usr/local/go/bin/go /usr/bin/go && \ - boxborder "golang symlink created at /usr/bin/go" + logger boxborder "golang symlink created at /usr/bin/go" fi + return 0 } # Function for displaying the usage of this script From 5e505be42693e0f0b122fedc0988337ddf1abd0e Mon Sep 17 00:00:00 2001 From: pyr0ball Date: Thu, 15 Jun 2023 03:05:29 -0700 Subject: [PATCH 15/15] fixed extras still picking up logs --- install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install.sh b/install.sh index 4d5151a..939797e 100755 --- a/install.sh +++ b/install.sh @@ -300,7 +300,7 @@ install-deps(){ } install-extras(){ - _extras=($(ls ${escape_dir}/extras/ | grep -v '*\.log' )) + _extras=($(ls ${escape_dir}/extras/ | grep -v 'log$')) # extra_installs=$(ls ${escape_dir}/extras/) # for file in $extra_installs ; do # _extras+=("$file")