From: Christian Heller Date: Sat, 13 Jun 2015 12:41:43 +0000 (+0200) Subject: Improve symlink script. X-Git-Url: https://plomlompom.com/repos/%7B%7Bprefix%7D%7D/conditions?a=commitdiff_plain;h=8db1ace1141713a4199422eab83574c1f5e94a08;p=config Improve symlink script. --- 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