DRY up init.sh and add .gitconfig
This commit is contained in:
parent
71fcb2a54d
commit
8a043d414b
1 changed files with 10 additions and 6 deletions
16
init.sh
16
init.sh
|
|
@ -8,9 +8,13 @@ else
|
||||||
CONFIG_PATH="${HOME}/config"
|
CONFIG_PATH="${HOME}/config"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
[ -e ".ackrc" ] || ln -s "${CONFIG_PATH}/ackrc" ".ackrc"
|
link_config() {
|
||||||
[ -e ".emacs" ] || ln -s "${CONFIG_PATH}/emacs" ".emacs"
|
file="$1"
|
||||||
[ -e ".emacs.d" ] || ln -s "${CONFIG_PATH}/emacs.d" ".emacs.d"
|
[ -e ".$file" ] || ln -s "${CONFIG_PATH}/$file" ".$file"
|
||||||
[ -e ".screenrc" ] || ln -s "${CONFIG_PATH}/screenrc" ".screenrc"
|
}
|
||||||
[ -e ".vimrc" ] || ln -s "${CONFIG_PATH}/vimrc" ".vimrc"
|
|
||||||
[ -e ".zshenv" ] || ln -s "${CONFIG_PATH}/zshenv" ".zshenv"
|
CONFIG_FILES="ackrc emacs emacs.d gitconfig screenrc vimrc zshenv"
|
||||||
|
|
||||||
|
for file in $CONFIG_FILES; do
|
||||||
|
link_config "$file"
|
||||||
|
done
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue