not completely general yet, since archives list is encoded in script, but a lot nicer and closer to what i want for any machine.
--- /dev/null
+#!/bin/bash
+
+# compares this machine's local archives against an exemplar set.
+
+target="$1"; shift
+
+if [ -z "$target" ]; then
+ target=wildmutt
+ #target=curie
+fi
+
+source "$FEISTY_MEOW_SCRIPTS/core/launch_feisty_meow.sh"
+source "$FEISTY_MEOW_SCRIPTS/archival/general_updater.sh"
+
+uber_archive_comparator $target
+
popd
}
+# compares one local well-known folder against the similar folder on a
+# remote destination.
+function do_a_folder_compare()
+{
+ local archname="$1"; shift
+ local dest="$1"; shift
+ if [ -z "$archname" -o -z "$dest" ]; then
+ echo "do_a_folder_compare needs an archive name and a destination host."
+ return 1
+ fi
+
+ if [ -d "/z/$archname" ]; then
+ sep 14
+ echo "Comparing $archname folder..."
+ compare_dirs /z/${archname} ${dest}:/z/${archname}
+ sep 14
+ fi
+}
+
+# runs through all the local archives on this host to make sure nothing is
+# different when compared with the mainline versions on the specified host.
+function uber_archive_comparator()
+{
+ local target="$1"; shift
+ if [ -z "$target" ]; then
+ echo uber_archive_comparator needs the target host to compare with.
+ return 1
+ fi
+
+ sep 14
+ echo "comparing against host '$target'"
+ sep 14
+
+#hmmm: shouldn't this be a list in a variable someplace?
+ for archicle in \
+ basement \
+ imaginations \
+ musix \
+ toaster \
+ walrus \
+ ; do
+ do_a_folder_compare $archicle $target
+ done
+}
+
+
#hmmm: abstractable piece? the runtime plug at the end of a library script?
# this block should execute when the script is actually run, rather
# than when it's just being sourced.
#!/bin/bash
-# runs through all the local archives on this host to make sure nothing is
-# different when compared with the mainline versions on the specified host.
-
-target="$1"; shift
-
-if [ -z "$target" ]; then
- target=wildmutt
- #target=curie
-fi
-
source "$FEISTY_MEOW_SCRIPTS/core/launch_feisty_meow.sh"
+source "$FEISTY_MEOW_SCRIPTS/archival/comparator.sh"
-function do_a_folder_compare()
-{
- local archname="$1"; shift
- local dest="$1"; shift
-#hmmm: error checking?
-
- if [ -d "/z/$archname" ]; then
- sep 14
- echo "Comparing $archname folder..."
- compare_dirs /z/${archname} ${dest}:/z/${archname}
- sep 14
- fi
-}
-
-for archicle in \
- basement \
- imaginations \
- musix \
- toaster \
- walrus \
-; do
- do_a_folder_compare $archicle $target
-done
-#cruft:
-#sep 14
-#echo "Comparing basement folder..."
-#compare_dirs /z/basement ${target}:/z/basement
-#sep 14
-#
-#sep 14
-#echo "Comparing imaginations folder..."
-#compare_dirs /z/imaginations ${target}:/z/imaginations
-#sep 14
-#
-#sep 14
-#echo "Comparing musix folder..."
-#compare_dirs /z/musix ${target}:/z/musix
-#sep 14
-#
-#sep 14
-#echo "Comparing walrus folder..."
-#compare_dirs /z/walrus ${target}:/z/walrus
-#sep 14