chiark / gitweb /
xset b off
[ian-dotfiles.git] / infra / makelinks
index 92029442509bee8d631798e5a9a45c077a55e7e4..46c901e9b0c0a3d17a62abac41802243d6e6e231 100755 (executable)
@@ -76,6 +76,18 @@ process_object () {
     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
@@ -134,7 +146,7 @@ while read <&3 ours underhome; do
            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"