chiark / gitweb /
Prepare for home/: Break out process_object. (nfc)
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Wed, 16 Dec 2015 18:32:07 +0000 (18:32 +0000)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Wed, 16 Dec 2015 18:32:07 +0000 (18:32 +0000)
infra/makelinks

index dd167d3..d6b6186 100755 (executable)
@@ -72,11 +72,7 @@ with_log () {
     "$@"
 }
 
-dots=$( find dot -mindepth 1 -maxdepth 1 -name '[0-9a-zA-Z]*[0-9a-zA-Z]' )
-
-for dot in $dots; do
-    ours="$dot"
-    underhome=".${dot#dot/}"
+process_object () {
     inhome="$HOME/$underhome"
     prhome="~/$underhome"
     linktarget="$basepath/$ours"
@@ -109,6 +105,14 @@ for dot in $dots; do
     else
        bad "mismatched file types"
     fi
+}
+
+dots=$( find dot -mindepth 1 -maxdepth 1 -name '[0-9a-zA-Z]*[0-9a-zA-Z]' )
+
+for dot in $dots; do
+    ours="$dot"
+    underhome=".${dot#dot/}"
+    process_object
 done
 
 brokens=$(