X-Git-Url: https://plomlompom.com/repos/berlin_corona.txt?a=blobdiff_plain;f=bin%2Fsymlink.sh;h=5f4fc8177d6cb500b96bb6ffcaa82d81707c1ba1;hb=67e783c56b750fdb3d9e77eada3cd3dd9935d5f7;hp=412b55d9e3001c7d8b425902eaa26b66ed9a47a8;hpb=81429a6325f9b45ef6cbd6a7a2b390ae1c7e8ba6;p=config diff --git a/bin/symlink.sh b/bin/symlink.sh index 412b55d..5f4fc81 100755 --- a/bin/symlink.sh +++ b/bin/symlink.sh @@ -1,11 +1,13 @@ #!/bin/sh set -x +set -e dir_minimal=~/config/dotfiles/minimal -dir_user_minimal=~/config/dotfiles/user/minimal -dir_user_thinkpad=~/config/dotfiles/user/thinkpad -dir_user_server=~/config/dotfiles/user/server +dir_user_prefix=~/config/dotfiles/user +dir_user_minimal=$dir_user_prefix/minimal +dir_user_machine=$dir_user_prefix/$1 +dir_user_variety=$dir_user_prefix/$2 dir_root=~/config/dotfiles/root homedir=`echo ~` find ~ -lname $homedir'/config/*' -delete @@ -20,13 +22,10 @@ else for file in `ls $dir_user_minimal`; do ln -fs $dir_user_minimal/$file ~/.$file done - if [ "$1" = "thinkpad" ]; then - for file in `ls $dir_user_thinkpad`; do - ln -fs $dir_user_thinkpad/$file ~/.$file - done - elif [ "$1" = "server" ]; then - for file in `ls $dir_user_server`; do - ln -fs $dir_user_server/$file ~/.$file - done - fi + for file in `ls $dir_user_machine`; do + ln -fs $dir_user_machine/$file ~/.$file + done + for file in `ls $dir_user_variety`; do + ln -fs $dir_user_variety/$file ~/.$file + done fi