From e10414b6e6106395ff4f4b298b542ff74513aadd Mon Sep 17 00:00:00 2001 From: Christian Heller Date: Sun, 3 May 2015 05:00:10 +0200 Subject: [PATCH] Unity symlink scripts. --- symlink.sh | 7 ++++++- symlink_root.sh | 7 ------- 2 files changed, 6 insertions(+), 8 deletions(-) delete mode 100755 symlink_root.sh 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 -- 2.30.2