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:
12
install.sh
12
install.sh
@@ -1,9 +1,9 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
cd "$( dirname "${BASH_SOURCE[0]}" )"
|
cd "$( dirname "${BASH_SOURCE[0]}" )" || exit 1
|
||||||
|
|
||||||
commandAvailable() {
|
commandAvailable() {
|
||||||
command -v $1 >/dev/null
|
command -v "$1" >/dev/null
|
||||||
}
|
}
|
||||||
|
|
||||||
installIfAvailable() {
|
installIfAvailable() {
|
||||||
@@ -19,9 +19,9 @@ installIfAvailable() {
|
|||||||
PACKAGE=$COMMAND
|
PACKAGE=$COMMAND
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if commandAvailable $COMMAND; then
|
if commandAvailable "$COMMAND"; then
|
||||||
echo "Installing configuration files for $PACKAGE…"
|
echo "Installing configuration files for $PACKAGE…"
|
||||||
stow -t $HOME $PACKAGE
|
stow -t "$HOME" "$PACKAGE"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -39,7 +39,7 @@ echo "done."
|
|||||||
|
|
||||||
if commandAvailable vim; then
|
if commandAvailable vim; then
|
||||||
echo "Creating vim directories"
|
echo "Creating vim directories"
|
||||||
mkdir -p $HOME/.cache/vim/{backup,swap,undo}
|
mkdir -p "$HOME/.cache/vim/"{backup,swap,undo}
|
||||||
fi
|
fi
|
||||||
|
|
||||||
installIfAvailable vim
|
installIfAvailable vim
|
||||||
@@ -50,7 +50,7 @@ installIfAvailable systemctl systemd
|
|||||||
installIfAvailable pacman
|
installIfAvailable pacman
|
||||||
installIfAvailable git
|
installIfAvailable git
|
||||||
installIfAvailable latexmk
|
installIfAvailable latexmk
|
||||||
installIfAvailable gem
|
installIfAvailable ruby
|
||||||
installIfAvailable npm
|
installIfAvailable npm
|
||||||
installIfAvailable python
|
installIfAvailable python
|
||||||
installIfAvailable Xorg
|
installIfAvailable Xorg
|
||||||
|
|||||||
3
ruby/.bundle/config
Normal file
3
ruby/.bundle/config
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
---
|
||||||
|
BUNDLE_PATH: "~/.gem"
|
||||||
|
BUNDLE_AUTO_INSTALL: "true"
|
||||||
@@ -43,12 +43,7 @@ test -f "$XDG_CONFIG_HOME/tmux/tmux.conf" && alias tmux="tmux -f $XDG_CONFIG_HOM
|
|||||||
|
|
||||||
# Set up Rubygems
|
# Set up Rubygems
|
||||||
if type gem &> /dev/null; then
|
if type gem &> /dev/null; then
|
||||||
export GEMRC="$XDG_CONFIG_HOME/gem/gemrc"
|
path+="$HOME/.gem/bin"
|
||||||
|
|
||||||
#TODO: move this to XDG_DATA_HOME
|
|
||||||
export GEM_HOME=$(ruby -e 'puts Gem.user_dir' 2>/dev/null)
|
|
||||||
|
|
||||||
path+="$GEM_HOME/bin"
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Set up Weechat alternative directory
|
# Set up Weechat alternative directory
|
||||||
|
|||||||
Reference in New Issue
Block a user