From 8db1ace1141713a4199422eab83574c1f5e94a08 Mon Sep 17 00:00:00 2001 From: Christian Heller Date: Sat, 13 Jun 2015 14:41:43 +0200 Subject: [PATCH] Improve symlink script. --- symlink.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/symlink.sh b/symlink.sh index c4e5404..1b966ef 100755 --- a/symlink.sh +++ b/symlink.sh @@ -4,8 +4,10 @@ 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)" -eq "0" ]; then for file in `ls $dir_root`; do -- 2.30.2