chiark
/
gitweb
/
~ian
/
ian-dotfiles.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
538dc4d
)
Get link target right for subdirs
author
Ian Jackson
<ijackson@chiark.greenend.org.uk>
Wed, 16 Dec 2015 23:46:25 +0000
(23:46 +0000)
committer
Ian Jackson
<ijackson@chiark.greenend.org.uk>
Wed, 16 Dec 2015 23:46:25 +0000
(23:46 +0000)
infra/makelinks
patch
|
blob
|
history
diff --git
a/infra/makelinks
b/infra/makelinks
index 96ec405227a79055d79fbfacc1251c09be07d734..46c901e9b0c0a3d17a62abac41802243d6e6e231 100755
(executable)
--- a/
infra/makelinks
+++ b/
infra/makelinks
@@
-76,6
+76,18
@@
process_object () {
inhome="$HOME/$underhome"
prhome="~/$underhome"
linktarget="$basepath/$ours"
inhome="$HOME/$underhome"
prhome="~/$underhome"
linktarget="$basepath/$ours"
+ chompy="$underhome"
+ while true; do
+ case "$chompy" in
+ *?/?*)
+ linktarget="../$linktarget"
+ chompy="${chompy%/*}"
+ ;;
+ *)
+ break
+ ;;
+ esac
+ done
if [ "$inhome" -ef "$ours" ]; then
good "already symlinked here"
elif [ -h "$inhome" ]; then
if [ "$inhome" -ef "$ours" ]; then
good "already symlinked here"
elif [ -h "$inhome" ]; then