X-Git-Url: https://plomlompom.com/repos/%7B%7B%20web_path%20%7D%7D/decks/%7B%7Bdeck_id%7D%7D/cards/%7B%7Bcard_id%7D%7D/static/gitweb.js?a=blobdiff_plain;ds=sidebyside;f=symlink.sh;h=a78b1dec9ad57240b49b7367db5623c558fb6d2d;hb=e10414b6e6106395ff4f4b298b542ff74513aadd;hp=9343880d057918d81c4f0999c5b6523c1ada5459;hpb=d0d02fe80462454af327133f5579b2b3260366e4;p=config diff --git a/symlink.sh b/symlink.sh index 9343880..a78b1de 100755 --- a/symlink.sh +++ b/symlink.sh @@ -1,7 +1,12 @@ #!/bin/sh dir=~/config/dotfiles -cd ~ +dir_root=~/config/dotfiles_root for file in `ls $dir`; do ln -fs $dir/$file ~/.$file done +if [ "$(id -u)" -ne "0" ]; then + for file in `ls $dir_root`; do + ln -fs $dir_root/$file ~/.$file + done +fi