home
·
contact
·
privacy
projects
/
config
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c591794
)
Improve symlink script.
author
Christian Heller
<c.heller@plomlompom.de>
Tue, 13 Nov 2018 22:24:32 +0000
(23:24 +0100)
committer
Christian Heller
<c.heller@plomlompom.de>
Tue, 13 Nov 2018 22:24:32 +0000
(23:24 +0100)
all_new_2018/symlink_etc.sh
patch
|
blob
|
history
diff --git
a/all_new_2018/symlink_etc.sh
b/all_new_2018/symlink_etc.sh
index 9a7a162f07c28b137fe1186ffe189b34af7904d2..edee563182d1d02fa3b320bb5bca4dd4e0a0fec8 100755
(executable)
--- a/
all_new_2018/symlink_etc.sh
+++ b/
all_new_2018/symlink_etc.sh
@@
-14,7
+14,9
@@
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}"
+ linking=$(echo "${path}" | cut -c2-)
+ linked=$(realpath "${path}")
+ dir=$(dirname "${linking}")
+ mkdir -p "${dir}"
+ ln -fs "${linked}" "${linking}"
done