X-Git-Url: https://plomlompom.com/repos/%7B%7Bprefix%7D%7D/ledger2?a=blobdiff_plain;f=all_new_2018%2Fsymlink_etc.sh;h=f1f97af1a557a27b5a5d51fdce500cda02c7cd23;hb=bebdb36b5829d317e14caced306d30a04179198f;hp=238d136123d2bbf92d74b432a27a0d620fbb5f3f;hpb=753f7f64a8295dac2ab15cf227396529441870a5;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 238d136..f1f97af --- a/all_new_2018/symlink_etc.sh +++ b/all_new_2018/symlink_etc.sh @@ -6,9 +6,15 @@ set -e target="$1" -config_tree_prefix="~/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" +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 . -type f); do + src=$(echo "${path}" | cut -c2-) + dest=$(realpath "${path}") + ln -fs "${dest}" "${src}" done