Rewrite create_symlinks.sh script
This commit is contained in:
parent
5ca342911e
commit
0148f19022
1 changed files with 20 additions and 9 deletions
|
@ -2,12 +2,23 @@
|
|||
rel_dir="${PWD#$HOME/}"
|
||||
echo "Configs relative to home in $rel_dir."
|
||||
|
||||
for i in *; do
|
||||
case $i in
|
||||
README | create_symlinks.sh | eu_US.keylayout | *~)
|
||||
;;
|
||||
*)
|
||||
ln -s $rel_dir/$i $HOME/.$i
|
||||
;;
|
||||
esac
|
||||
done
|
||||
link_file() {
|
||||
ln -s "$3$rel_dir/$1" "$HOME/$2"
|
||||
}
|
||||
|
||||
link_file gitconfig .gitconfig
|
||||
mkdir -p $HOME/.gnupg
|
||||
link_file gpg.conf .gnupg/gpg.conf ../
|
||||
link_file tmux.conf .tmux.conf
|
||||
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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue