From 2004b0439e1f62fc6f747627b84c29072a9efb91 Mon Sep 17 00:00:00 2001 From: Christian Heller Date: Tue, 13 Nov 2018 23:02:00 +0100 Subject: [PATCH] Improve symlink script. --- all_new_2018/symlink_etc.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) mode change 100644 => 100755 all_new_2018/symlink_etc.sh diff --git a/all_new_2018/symlink_etc.sh b/all_new_2018/symlink_etc.sh old mode 100644 new mode 100755 index 08f1913..16edd24 --- a/all_new_2018/symlink_etc.sh +++ b/all_new_2018/symlink_etc.sh @@ -8,7 +8,8 @@ set -e target="$1" config_tree_prefix="${HOME}/config/all_new_2018/linkable_etc_files/" cd "${config_tree_prefix}""${target}" -for path in $(find .); do - dest=$(echo "${path}" | cut -c2-) - ln -fs "${path}" "${dest}" +for path in $(find . -type f); do + src=$(echo "${path}" | cut -c2-) + dest=$(realpath "${path}") + ln -fs "${dest}" "${src}" done -- 2.30.2