2 # Symbolically link files to those in argument-selected subdirectories
3 # of linkable_etc_files//, e.g. link /etc/foo/bar to
4 # linkable_etc_files/$1/etc/foo/bar and so on. Create directories as
6 # CAUTION: This removes original files at the affected paths.
10 cd "${config_tree_prefix}${target}"
11 for path in $(find . -type f); do
12 linking=$(echo "${path}" | cut -c2-)
13 linked=$(realpath "${path}")
14 dir=$(dirname "${linking}")
16 ln -fs "${linked}" "${linking}"