Skip to content

Commit

Permalink
🔥 Remove SDKman, jenv and related upgrades
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
wingy3181 committed Dec 3, 2023
1 parent 7e8839a commit 321c383
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 37 deletions.
26 changes: 0 additions & 26 deletions src/shell/bash_functions
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down
5 changes: 0 additions & 5 deletions src/shell/bash_profile
Original file line number Diff line number Diff line change
Expand Up @@ -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
4 changes: 0 additions & 4 deletions src/shell/bashrc
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 0 additions & 2 deletions src/shell/macos/bash_aliases
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand Down

0 comments on commit 321c383

Please sign in to comment.