X-Git-Url: https://plomlompom.com/repos/foo.html?a=blobdiff_plain;f=symlink.sh;h=c4e540494a8db102f51c3cf97847ed531c5ada2b;hb=6326b9f88d6e3de295eed9b06d50e918d57b5882;hp=3d399d37e23101fcbf6914693a4f576c8f2f2f89;hpb=fb80d489e900b30ddd421b002171612227d95ae0;p=config diff --git a/symlink.sh b/symlink.sh index 3d399d3..c4e5404 100755 --- a/symlink.sh +++ b/symlink.sh @@ -1,7 +1,14 @@ #!/bin/sh +set -x + dir=~/config/dotfiles -cd ~ +dir_root=~/config/dotfiles_root for file in `ls $dir`; do - ln -s $dir/$file ~/.$file + ln -fs $dir/$file ~/.$file done +if [ "$(id -u)" -eq "0" ]; then + for file in `ls $dir_root`; do + ln -fs $dir_root/$file ~/.$file + done +fi