chiark
/
gitweb
/
~ian
/
ian-dotfiles.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
xset b off
[ian-dotfiles.git]
/
infra
/
makelinks
diff --git
a/infra/makelinks
b/infra/makelinks
index 92029442509bee8d631798e5a9a45c077a55e7e4..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
@@
-134,7
+146,7
@@
while read <&3 ours underhome; do
if [ -d "$punderhome" ]; then
good "directory exists"
elif ! [ -e "$punderhome" ]; then
if [ -d "$punderhome" ]; then
good "directory exists"
elif ! [ -e "$punderhome" ]; then
- needs
install
"directory does not exist"
+ needs
setup
"directory does not exist"
$act mkdir -p "$punderhome"
else
bad "ought to be director but isn't"
$act mkdir -p "$punderhome"
else
bad "ought to be director but isn't"