"$@"
}
-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"
bad "wrong symlink target"
elif ! [ -e "$inhome" ]; then
needs setup "absent here"
- $act ln -s "$basepath/$dot" "$inhome"
+ $act ln -s "$linktarget" "$inhome"
elif [ -f "$inhome" ] && [ -f "$ours" ]; then
if cmp -s "$ours" "$inhome"; then
needs setup "identical here but not yet symlinked"
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=$(