X-Git-Url: https://plomlompom.com/repos/feed.xml?a=blobdiff_plain;ds=sidebyside;f=symlink.sh;h=1b966ef2d650ce73c26069cc413a5b0a36259484;hb=7fd7e85e0305cfeb58c9267c37f4c68a840630cf;hp=f3399aaffa323615b77e0af1924207d40648e282;hpb=f2d96345f2aab50baae4c00ec78a21d4619bc3e2;p=config diff --git a/symlink.sh b/symlink.sh index f3399aa..1b966ef 100755 --- a/symlink.sh +++ b/symlink.sh @@ -4,10 +4,12 @@ set -x dir=~/config/dotfiles dir_root=~/config/dotfiles_root +homedir=`echo ~` +find ~ -lname $homedir'/config/*' -delete for file in `ls $dir`; do - ln -fs $dir/$file ~/.$file + ln -s $dir/$file ~/.$file done -if [ "$(id -u)" -ne "0" ]; then +if [ "$(id -u)" -eq "0" ]; then for file in `ls $dir_root`; do ln -fs $dir_root/$file ~/.$file done