From adec596dc3ddf34ba5f06c29e091587d156f0691 Mon Sep 17 00:00:00 2001 From: Cheong Yip Date: Sun, 3 Dec 2023 21:08:21 +1100 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=A5=20Remove=20SDKman,=20jenv=20and=20?= =?UTF-8?q?related=20upgrades?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The sdkman and jenv initialization snippets and their related upgrade commands were removed from bash_profile, bash_aliases, bash_functions, and bashrc. These tools are no longer needed in the project, thus cleaning the bash environment setup and reducing potential issues and maintenance effort. --- src/shell/bash_functions | 26 -------------------------- src/shell/bash_profile | 5 ----- src/shell/bashrc | 4 ---- src/shell/macos/bash_aliases | 2 -- 4 files changed, 37 deletions(-) diff --git a/src/shell/bash_functions b/src/shell/bash_functions index 3ebbe1733..fd31fe9db 100644 --- a/src/shell/bash_functions +++ b/src/shell/bash_functions @@ -428,32 +428,6 @@ update_terminal_cwd() { # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -# Upgrade jenv if it is installed. - -upgrade-jenv() { - - declare -r JENV_DIRECTORY="$HOME/.jenv" - - if [ -d "$JENV_DIRECTORY" ]; then # -d : True if file exists and is a directory. - # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # Ensure the latest version of `jenv` is used - - execute_without_spinner \ - "cd $JENV_DIRECTORY \ - && git fetch --quiet origin \ - && git checkout --quiet \$(git describe --abbrev=0 --tags) \ - && . $HOME/.bash.local \ - && cd -" \ - "jenv (upgrade)" - - # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - fi -} - -# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # Upgrade nvm if it is installed. upgrade-nvm() { diff --git a/src/shell/bash_profile b/src/shell/bash_profile index cb776d1f5..95afd31e7 100644 --- a/src/shell/bash_profile +++ b/src/shell/bash_profile @@ -62,8 +62,3 @@ unset -f source_bash_files # and time of the last login, the message of the day, etc.). if test -z "$TMUX"; then eval clear; fi - -# sdkman init snippet. See install script at https://get.sdkman.io/ -#THIS MUST BE AT THE END OF THE FILE FOR SDKMAN TO WORK!!! -export SDKMAN_DIR="${HOME}/.sdkman" -[[ -s "${SDKMAN_DIR}/bin/sdkman-init.sh" ]] && . "${SDKMAN_DIR}/bin/sdkman-init.sh" || return 0 diff --git a/src/shell/bashrc b/src/shell/bashrc index 91e81c46a..1024b0281 100644 --- a/src/shell/bashrc +++ b/src/shell/bashrc @@ -9,7 +9,3 @@ # PS1 : Prompt String 1 [ -n "$PS1" ] \ && . "$HOME/.bash_profile" - -# Below statement to stop sdkman install script from adding it's initialisation in both .bashrc and .bash_profile files -# See 'Attempt update of bash profiles' in install script at https://get.sdkman.io/ -# sdkman-init.sh diff --git a/src/shell/macos/bash_aliases b/src/shell/macos/bash_aliases index 5a42dc9d6..d9d033be5 100644 --- a/src/shell/macos/bash_aliases +++ b/src/shell/macos/bash_aliases @@ -124,8 +124,6 @@ alias u="sudo softwareupdate --install --all \ && brew cleanup \ && mas upgrade \ && bash-it update \ - && upgrade-jenv \ - && sdk selfupdate \ && upgrade-nvm \ && npm install -g npm \ && npm update -g \