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 dd167d31a200fcda856a91e3568a4a79670c275c..d6b6186f6bcc91903b18f87d3c62c102105ef54d 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=$(