shell/*: fix most shellcheck errors

This commit is contained in:
Felix Buehler 2021-12-06 12:41:02 +01:00
parent ced309e5a4
commit 0d8a6f0c01
9 changed files with 67 additions and 53 deletions

View file

@ -6,7 +6,7 @@ appendpath () {
*:"$1":*)
;;
*)
if [[ -d "$1" ]]; then
if [ -d "$1" ]; then
export PATH="${PATH:+$PATH:}$1"
fi
esac
@ -16,11 +16,11 @@ appendpath ~/.local/bin/
appendpath ~/.bin
if which ruby >/dev/null 2>&1 && which gem >/dev/null 2>&1; then
appendpath $(ruby -r rubygems -e 'puts Gem.user_dir')/bin
appendpath "$(ruby -r rubygems -e 'puts Gem.user_dir')"/bin
fi
# PERL cpan modules
appendpath $HOME/.perl/5/bin
appendpath "$HOME"/.perl/5/bin
export PERL5LIB="$HOME/.perl/5/lib/perl5:$PERL5LIB"
export PERL_LOCAL_LIB_ROOT="$HOME/.perl/5:$PERL_LOCAL_LIB_ROOT"
export PERL_MB_OPT="--install_base \"$HOME/.perl/5\""
@ -28,5 +28,5 @@ export PERL_MM_OPT="INSTALL_BASE=$HOME/.perl/5"
export GOPATH=$HOME/.go
export GOBIN=$HOME/.gobin
appendpath $GOPATH/bin
appendpath $GOBIN
appendpath "$GOPATH"/bin
appendpath "$GOBIN"