X-Git-Url: https://plomlompom.com/repos/%7B%7Bprefix%7D%7D/move_up?a=blobdiff_plain;f=all_new_2018%2Fsymlink_etc.sh;h=9a7a162f07c28b137fe1186ffe189b34af7904d2;hb=c5917948ea2b6f1114aaf239567298c3cd20d017;hp=08f19135ddbcb3528fc68a82ff3f48d9868ca975;hpb=90a243f03a92a386a1b2b24ffc74c42f2b55a61f;p=config diff --git a/all_new_2018/symlink_etc.sh b/all_new_2018/symlink_etc.sh old mode 100644 new mode 100755 index 08f1913..9a7a162 --- a/all_new_2018/symlink_etc.sh +++ b/all_new_2018/symlink_etc.sh @@ -6,9 +6,15 @@ set -e target="$1" +if [ ! "${target}" = "all" ] && [ ! "${target}" = "server" ]; then + echo "Need proper target." + false +fi + 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