Improve install script
This commit is contained in:
12
install.sh
12
install.sh
@ -1,8 +1,18 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
|
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
|
||||||
|
|
||||||
|
link_config () {
|
||||||
|
local name="$1"
|
||||||
|
ln -sf "$DIR/$name" "$HOME/.$name"
|
||||||
|
}
|
||||||
|
|
||||||
if [ ! -d ~/.vim/bundle ]; then
|
if [ ! -d ~/.vim/bundle ]; then
|
||||||
mkdir -p ~/.vim/bundle
|
mkdir -p ~/.vim/bundle
|
||||||
git clone https://github.com/VundleVim/Vundle.vim.git ~/.vim/bundle/Vundle.vim
|
git clone https://github.com/VundleVim/Vundle.vim.git ~/.vim/bundle/Vundle.vim
|
||||||
fi
|
fi
|
||||||
ln -sf "$DIR/vimrc" ~/.vimrc
|
|
||||||
|
for file in $(ls *); do
|
||||||
|
[ "$file" == "install.sh" ] && continue
|
||||||
|
[ "$file" == "README.md" ] && continue
|
||||||
|
link_config "$file"
|
||||||
|
done
|
||||||
|
Reference in New Issue
Block a user