diff --git a/golang-update.sh b/internal/update-golang.sh similarity index 100% rename from golang-update.sh rename to internal/update-golang.sh diff --git a/setup/0-pre-config.sh b/setup/0-pre-config.sh index 59ec291..ab09ff0 100755 --- a/setup/0-pre-config.sh +++ b/setup/0-pre-config.sh @@ -2,25 +2,25 @@ read -p 'Install git and vim? [y/N]: ' response case "${response}" in - [Yy]* ) - # before we can begin, we need what should have already been installed - sudo apt install git vim -y - ;; - * ) - echo 'Skipping' - ;; + [Yy]* ) + # before we can begin, we need what should have already been installed + sudo apt install git vim -y + ;; + * ) + echo 'Skipping' + ;; esac echo '' read -p 'Enable available aliases within your ~/.bashrc? [y/N]: ' response case "${response}" in - [Yy]* ) - # enable available aliases - sed -i -e 's/#alias/alias/g' "${HOME}/.bashrc" - ;; - * ) - echo 'Skipping' - ;; + [Yy]* ) + # enable available aliases + sed -i -e 's/#alias/alias/g' "${HOME}/.bashrc" + ;; + * ) + echo 'Skipping' + ;; esac echo '' diff --git a/setup/1-choose-packages.sh b/setup/1-choose-packages.sh index 9b8584b..d0ee664 100755 --- a/setup/1-choose-packages.sh +++ b/setup/1-choose-packages.sh @@ -37,7 +37,7 @@ install_collection 'extra utilities: (ncdu, zip, php, rclone, etc.)' ncdu zip un read -p 'Install Node.js v22? [y/N]: ' response case "${response}" in [Yy]* ) - sudo "${script_dir}/../nodejs-install/nodesource_setup.sh" + sudo "${script_dir}/../nodesource/scripts/deb/setup_lts.x" sudo apt install nodejs -y ;; * ) @@ -48,40 +48,37 @@ echo '' # ---------------------------------------------------------- -echo "----- Install NodeJS Apps Yarn and HttpServer -------" -read -p 'Install NodeJS Apps "yarn" and "http-server" globally? [y/N]: ' node_more -case $node_more in +read -p 'Install Node.js packages "yarn" and "http-server" globally? [y/N]: ' response +case "${response}" in [Yy]* ) - echo "----- Installing NodeJS 'yarn' globally -------------" sudo npm install --global yarn - echo "----- Installing NodeJS 'http-server' globally ------" sudo npm install --global http-server - echo "----- Completed NodeJS Apps -------------------------" ;; * ) echo 'Skipping' ;; esac +echo '' -echo "----- Install Go Lang -------------------------------" -read -p 'Install Go Lang? [y/N]: ' go_lang -case $go_lang in +# ---------------------------------------------------------- + +read -p 'Install GoLang? [y/N]: ' response +case "${response}" in [Yy]* ) - echo "----- Determining current stable go version ---------" + sudo apt isntall jq -y # load json file with version info, filter to only stable versions, take the first (newest), strip to just numeric + version_flag='' go_version=$(wget --quiet --output-document - 'https://go.dev/dl/?mode=json' | jq -r '.[] | select( .stable ) | .version' | head -n 1 | sed 's/[^0-9.]*//g') - if [[ -n "$go_version" ]]; then + if [[ -n "${go_version}" ]]; then version_flag='--version' - echo "Installing Go Version: $go_version" + echo "Installing GoLand Version: ${go_version}" fi - echo "----- Calling Go Install Script ---------------------" - LOCATION=`dirname "$0"` - "${LOCATION}/../golang-install/goinstall.sh" "$version_flag" "$go_version" - echo "----- Completed Go Install Script -------------------" + "${script_dir}/../golang-install/goinstall.sh" "${version_flag}" "${go_version}" ;; * ) echo 'Skipping' ;; esac +echo ''