|
@ -25,7 +25,12 @@ link_dir() { |
|
|
mv "$1/$2" "$1/$2.old" |
|
|
mv "$1/$2" "$1/$2.old" |
|
|
echo "Backed up original $2 to $1/$2.old" |
|
|
echo "Backed up original $2 to $1/$2.old" |
|
|
fi |
|
|
fi |
|
|
|
|
|
|
|
|
|
|
|
# Don't overwrite links |
|
|
|
|
|
if [ ! -L "$1/$2" ]; then |
|
|
|
|
|
echo "ln -sf $3 $1/$2" |
|
|
ln -sf "$3" "$1/$2" |
|
|
ln -sf "$3" "$1/$2" |
|
|
|
|
|
fi |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
set -x |
|
|
set -x |
|
@ -45,9 +50,11 @@ fi |
|
|
VIM_BUNDLE=$HOME/.vim/bundle |
|
|
VIM_BUNDLE=$HOME/.vim/bundle |
|
|
mkdir -p $VIM_BUNDLE |
|
|
mkdir -p $VIM_BUNDLE |
|
|
plugins=($(ls -d $PWD/.vim/bundle/* | tr -s ' ')) |
|
|
plugins=($(ls -d $PWD/.vim/bundle/* | tr -s ' ')) |
|
|
|
|
|
echo "${plugins[@]}" |
|
|
for plugin in ${plugins[@]}; do |
|
|
for plugin in ${plugins[@]}; do |
|
|
parts=($(echo "$plugin" | tr '/' ' ')) |
|
|
parts=($(echo "$plugin" | tr '/' ' ')) |
|
|
plugin_name=${parts[-1]} |
|
|
plugin_name=${parts[-1]} |
|
|
|
|
|
echo "$VIM_BUNDLE $plugin_name $plugin" |
|
|
link_dir $VIM_BUNDLE $plugin_name $plugin |
|
|
link_dir $VIM_BUNDLE $plugin_name $plugin |
|
|
done |
|
|
done |
|
|
|
|
|
|
|
@ -64,6 +71,7 @@ if [ ! -f "$HOME/.update_dotfiles.sh" ]; then |
|
|
echo "cd $PWD" >> $HOME/.update_dotfiles.sh |
|
|
echo "cd $PWD" >> $HOME/.update_dotfiles.sh |
|
|
echo "git checkout master" >> $HOME/.update_dotfiles.sh |
|
|
echo "git checkout master" >> $HOME/.update_dotfiles.sh |
|
|
echo "git pull" >> $HOME/.update_dotfiles.sh |
|
|
echo "git pull" >> $HOME/.update_dotfiles.sh |
|
|
|
|
|
echo "git submodule init" >> $HOME/.update_dotfiles.sh |
|
|
echo "git submodule update" >> $HOME/.update_dotfiles.sh |
|
|
echo "git submodule update" >> $HOME/.update_dotfiles.sh |
|
|
chmod +x $HOME/.update_dotfiles.sh |
|
|
chmod +x $HOME/.update_dotfiles.sh |
|
|
fi |
|
|
fi |