From: Chris Koeritz Date: Thu, 18 Oct 2018 07:54:12 +0000 (-0400) Subject: generalized X-Git-Tag: 2.140.115^2~84 X-Git-Url: https://feistymeow.org/gitweb/?a=commitdiff_plain;h=6a60fb3300431fcc3001b1c5dec3fdf814ee2de4;p=feisty_meow.git generalized --- diff --git a/scripts/customize/fred/scripts/archival/euphrosyne_comparator.sh b/scripts/customize/fred/scripts/archival/euphrosyne_comparator.sh index 28f703b8..4433e0e2 100644 --- a/scripts/customize/fred/scripts/archival/euphrosyne_comparator.sh +++ b/scripts/customize/fred/scripts/archival/euphrosyne_comparator.sh @@ -1,31 +1,58 @@ #!/bin/bash -# runs through all the local archives on euphrosyne to make sure nothing is different -# when compared to the mainline versions on surya. +# 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. -#hmmm: add a check that this is in fact the right host, euphrosyne. +target="$1"; shift -#target=wildmutt -target=curie +if [ -z "$target" ]; then + target=wildmutt + #target=curie +fi source "$FEISTY_MEOW_SCRIPTS/core/launch_feisty_meow.sh" -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 +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