1
1
Fork 0

Rewrite create_symlinks.sh script

This commit is contained in:
Jonathan Schleifer 2018-07-08 19:59:33 +00:00
parent 5ca342911e
commit 0148f19022

View file

@ -2,12 +2,23 @@
rel_dir="${PWD#$HOME/}" rel_dir="${PWD#$HOME/}"
echo "Configs relative to home in $rel_dir." echo "Configs relative to home in $rel_dir."
for i in *; do link_file() {
case $i in ln -s "$3$rel_dir/$1" "$HOME/$2"
README | create_symlinks.sh | eu_US.keylayout | *~) }
;;
*) link_file gitconfig .gitconfig
ln -s $rel_dir/$i $HOME/.$i mkdir -p $HOME/.gnupg
;; link_file gpg.conf .gnupg/gpg.conf ../
esac link_file tmux.conf .tmux.conf
done link_file vim .vim
link_file vimrc .vimrc
link_file zshrc .zshrc
if test x"$(uname -s)" = x"Darwin"; then
link_file eu_US.keylayout \
"Library/Keyboard Layouts/eu_US.keylayout" ../../
else
link_file Xdefaults .Xdefaults
link_file Xmodmap .Xmodmap
link_file xinitrc .xinitrc
fi