Use smarter functions for rc.local/ scripts

This commit is contained in:
Martin Blazik
2022-05-29 16:16:21 +02:00
parent 91ab592f83
commit 0f3076dd96
5 changed files with 14 additions and 11 deletions

View File

@@ -1,3 +1,3 @@
GIT_PROMPT_INIT="$HOME/.bash-git-prompt/gitprompt.sh" nop ${GIT_PROMPT_INIT:="$HOME/.bash-git-prompt/gitprompt.sh"}
GIT_PROMPT_ONLY_IN_REPO=1 nop ${GIT_PROMPT_ONLY_IN_REPO:=1}
source_try "$GIT_PROMPT_INIT" source_try "$GIT_PROMPT_INIT"

View File

@@ -1,2 +1,4 @@
prepend_path "$HOME/go/bin" prepend_path_try "$HOME/go/bin"
export GOROOT=$(go env GOROOT) if can_run go; then
export GOROOT=$(go env GOROOT)
fi

View File

@@ -1,7 +1,7 @@
BREW_HOME=/home/linuxbrew nop ${BREW_HOME:=/home/linuxbrew}
BREW="$BREW_HOME/.linuxbrew/bin/brew" nop ${BREW:="$BREW_HOME/.linuxbrew/bin/brew"}
if [[ -e $BREW ]]; then if [[ -e "$BREW" ]]; then
eval "$($BREW shellenv)" eval "$($BREW shellenv)"
fi fi

View File

@@ -1,2 +1,3 @@
export SDKMAN_DIR="/home/lachtan/.sdkman" nop "${SDKMAN_DIR:=$HOME/.sdkman}"
export SDKMAN_DIR
source_try "$SDKMAN_DIR/bin/sdkman-init.sh" source_try "$SDKMAN_DIR/bin/sdkman-init.sh"

View File

@@ -1,3 +1,3 @@
prepend_path "$HOME/.local/bin" prepend_path_try "$HOME/.local/bin"
append_path "$HOME/.arkade/bin" append_path_try "$HOME/.arkade/bin"
append_path "$HOME/.cargo/bin" append_path_try "$HOME/.cargo/bin"