diff --git a/install.sh b/install.sh index 6f4d1ce..67575ba 100755 --- a/install.sh +++ b/install.sh @@ -1,9 +1,9 @@ #!/bin/bash -cd "$( dirname "${BASH_SOURCE[0]}" )" +cd "$( dirname "${BASH_SOURCE[0]}" )" || exit 1 commandAvailable() { - command -v $1 >/dev/null + command -v "$1" >/dev/null } installIfAvailable() { @@ -19,9 +19,9 @@ installIfAvailable() { PACKAGE=$COMMAND fi - if commandAvailable $COMMAND; then + if commandAvailable "$COMMAND"; then echo "Installing configuration files for $PACKAGE…" - stow -t $HOME $PACKAGE + stow -t "$HOME" "$PACKAGE" fi } @@ -39,7 +39,7 @@ echo "done." if commandAvailable vim; then echo "Creating vim directories" - mkdir -p $HOME/.cache/vim/{backup,swap,undo} + mkdir -p "$HOME/.cache/vim/"{backup,swap,undo} fi installIfAvailable vim @@ -50,7 +50,7 @@ installIfAvailable systemctl systemd installIfAvailable pacman installIfAvailable git installIfAvailable latexmk -installIfAvailable gem +installIfAvailable ruby installIfAvailable npm installIfAvailable python installIfAvailable Xorg diff --git a/ruby/.bundle/config b/ruby/.bundle/config new file mode 100644 index 0000000..aeda600 --- /dev/null +++ b/ruby/.bundle/config @@ -0,0 +1,3 @@ +--- +BUNDLE_PATH: "~/.gem" +BUNDLE_AUTO_INSTALL: "true" diff --git a/gem/.config/gem/gemrc b/ruby/.gem/gemrc similarity index 100% rename from gem/.config/gem/gemrc rename to ruby/.gem/gemrc diff --git a/zsh/.config/zsh/.zshenv b/zsh/.config/zsh/.zshenv index fdf5a80..7d5af03 100644 --- a/zsh/.config/zsh/.zshenv +++ b/zsh/.config/zsh/.zshenv @@ -43,12 +43,7 @@ test -f "$XDG_CONFIG_HOME/tmux/tmux.conf" && alias tmux="tmux -f $XDG_CONFIG_HOM # Set up Rubygems if type gem &> /dev/null; then - export GEMRC="$XDG_CONFIG_HOME/gem/gemrc" - - #TODO: move this to XDG_DATA_HOME - export GEM_HOME=$(ruby -e 'puts Gem.user_dir' 2>/dev/null) - - path+="$GEM_HOME/bin" + path+="$HOME/.gem/bin" fi # Set up Weechat alternative directory