From: Christian Heller Date: Sun, 3 May 2015 03:00:10 +0000 (+0200) Subject: Unity symlink scripts. X-Git-Url: https://plomlompom.com/repos/%7B%7Bprefix%7D%7D/%7B%7B%20web_path%20%7D%7D/%7B%7Bdb.prefix%7D%7D/static/edit?a=commitdiff_plain;h=e10414b6e6106395ff4f4b298b542ff74513aadd;p=config Unity symlink scripts. --- 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 diff --git a/symlink_root.sh b/symlink_root.sh deleted file mode 100755 index 09cff77..0000000 --- a/symlink_root.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/sh - -dir=~/config/dotfiles_root -cd ~ -for file in `ls $dir`; do - ln -fs $dir/$file ~/.$file -done