shopt -s dotglob
# If we make a link back to the root, we stop going deeper into subdir_files.
-# This makes it so we can do subdir directories.
+# This makes it so we can do subdir directories. eg
+# /p/c/subdir_files/.config/gajim -> ../../gagim
#
# Also note, under filesystem/, symlinks are expanded.
for path in "${targets[@]}"; do
local fullpath
fullpath="$(readlink -f "$path")"
- #e $fullpath $below # debug
- if [[ -f $path || $(dirname $(readlink -f "$fullpath")) == "$below" ]]; then
+ if [[ -f $path || $(dirname "$fullpath") == "$below" ]]; then
m lnf -T "$path" "$HOME/${path#$root/}"
elif [[ -d "$path" ]]; then
subdir-link-r "$root" "$path"