1
0
mirror of https://github.com/bertptrs/vimconfig.git synced 2025-12-25 20:40:32 +01:00

Improve Ruby set-up.

This commit is contained in:
2019-01-25 15:41:21 +01:00
parent fed54cf38a
commit f43da0f256
4 changed files with 10 additions and 12 deletions

View File

@@ -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

3
ruby/.bundle/config Normal file
View File

@@ -0,0 +1,3 @@
---
BUNDLE_PATH: "~/.gem"
BUNDLE_AUTO_INSTALL: "true"

View File

@@ -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