# if there is a target folder of the appropriate name already on the backup medium.
source "$FEISTY_MEOW_SCRIPTS/core/launch_feisty_meow.sh"
-source "$FEISTY_MEOW_SCRIPTS/archival/shared_updater_parts.sh"
+# given a location in the filesystem, we will go to that location and attempt to
+# update any revision control repositories stored there to the latest versions.
+function update_source_folders()
+{
+ folder="$1"; shift
+ if [ ! -d "$folder" ]; then
+ echo "The folder '$folder' does not exist, so skipping repository update there."
+ return;
+ fi
+ echo getting latest codes in $folder...
+ pushd "$folder"
+ if [ $? -ne 0 ]; then
+ echo Changing to the folder $folder failed.
+ exit 1
+ fi
+ bash "$FEISTY_MEOW_SCRIPTS/rev_control/rcheckin.sh"
+ if [ $? -ne 0 ]; then
+ echo Checking out the latest codes has failed somehow for $folder.
+ exit 1
+ fi
+ popd
+}
+
+# this attempts to copy all the contents in a folder called "from" into a folder
+# called "to". it's a failure for the "from" folder to not exist, but the "to"
+# is allowed to not exist (in which case we don't try to synch to it).
+function synch_directory_to_target()
+{
+ local from="$1"; shift
+ local to="$1"; shift
+
+ sep
+
+ if [ ! -d "$from" ]; then
+ echo "skipping synch on missing source directory $from; this is not normal!"
+ exit 1
+ fi
+ if [ ! -d "$to" ]; then
+ echo "skipping synch into non-existent directory $to"
+ return
+ fi
+
+ echo "synching from $from into $to"
+ netcp "$from"/* "$to"/
+ if [ $? -ne 0 ]; then
+ echo "The synchronization of $from into $to has failed."
+ exit 1
+ fi
+}
+
+# the uber controller method that does the "hard" work of updating.
+# any items from the ARCHIVE_COLLECTION_LIST that are on the target will be
+# updated. any items found on the target matching the members of the
+# SOURCE_COLLECTION_LIST will be treated as code hierarchies and updated.
function update_archive_drive()
{
- local target_folder="$1"; shift
- # where we're backing up to.
+ local target_folder="$1"; shift # where we're backing up to.
+ local currdir # loop variable.
sep
# update source code if present.
echo getting latest fred repositories...
pushd "$target_folder"
- update_source_folders $SOURCE_HIERARCHY_LIST
-#hmmm:clean
-#extra_brain interbrane
-#need source list
+ for currdir in $SOURCE_HIERARCHY_LIST; do
+ update_source_folders $currdir
+ done
sep
- echo Updated all expected portions of the targets successfully.
+ echo successfully updated all expected portions of the target drive at:
+ echo " $target_folder"
}
+++ /dev/null
-#!/bin/bash
-
-source "$FEISTY_MEOW_SCRIPTS/core/launch_feisty_meow.sh"
-
-# given a location in the filesystem, we will go to that location and attempt to
-# update any revision control repositories stored there to the latest versions.
-function update_source_folders()
-{
- folder="$1"; shift
- if [ ! -d "$folder" ]; then
- echo "The folder '$folder' does not exist, so skipping repository update there."
- return;
- fi
- echo getting latest codes in $folder...
- pushd "$folder"
- if [ $? -ne 0 ]; then
- echo Changing to the folder $folder failed.
- exit 1
- fi
- bash "$FEISTY_MEOW_SCRIPTS/rev_control/rcheckin.sh"
- if [ $? -ne 0 ]; then
- echo Checking out the latest codes has failed somehow for $folder.
- exit 1
- fi
- popd
-}
-
-# this attempts to copy all the contents in a folder called "from" into a folder
-# called "to". it's a failure for the "from" folder to not exist, but the "to"
-# is allowed to not exist (in which case we don't try to synch to it).
-function synch_directory_to_target()
-{
- local from="$1"; shift
- local to="$1"; shift
-
- sep
-
- if [ ! -d "$from" ]; then
- echo "skipping synch on missing source directory $from; this is not normal!"
- exit 1
- fi
- if [ ! -d "$to" ]; then
- echo "skipping synch into non-existent directory $to"
- return
- fi
-
- echo "synching from $from into $to"
- netcp "$from"/* "$to"/
- if [ $? -ne 0 ]; then
- echo "The synchronization of $from into $to has failed."
- exit 1
- fi
-}
-
REPOSITORY_LIST+=" cloud ebooks web "
# adds our locally relevant archive folders into the list to be synched.
- ARCHIVE_COLLECTION_LIST+="/z/basement /z/imaginations /z/musix /z/toaster /z/walrus"
+ ARCHIVE_COLLECTION_LIST+="/z/archons /z/basement /z/imaginations /z/musix /z/toaster /z/walrus"
# our set of known source hierarchy folder names.
SOURCE_HIERARCHY_LIST="codebarn extra_brain interbrane"
--- /dev/null
+#!/bin/bash
+
+# compares the soapbox with the real archive to see if any older stuff might be
+# left behind. if it's got a less than in front, then it's only on the soapbox drive
+# now rather than the pc's hard drive.
+
+source "$FEISTY_MEOW_SCRIPTS/core/launch_feisty_meow.sh"
+
+function compare_archives_with_target()
+{
+ local target="$1"; shift
+
+ for currdir in $ARCHIVE_COLLECTION_LIST; do
+ sep
+ echo "comparing '$currdir' with target '$target', where 'less thans' are on the target..."
+ compare_dirs "$target/$(basename $currdir)" "$currdir"
+ done
+}
+
+#hmmm: generalize this one also.
+
+compare_archives_with_target /media/fred/soapboxdrive
+
+sep
+
--- /dev/null
+#!/bin/bash
+
+# runs through all the local archives on euphrosyne to make sure nothing is different
+# when compared to the mainline versions on surya.
+
+#hmmm: add a check that this is in fact the right host, euphrosyne.
+
+
+source "$FEISTY_MEOW_SCRIPTS/core/launch_feisty_meow.sh"
+
+sep 14
+echo "Comparing basement folder..."
+compare_dirs /z/basement wildmutt:/z/basement
+sep 14
+
+sep 14
+echo "Comparing imaginations folder..."
+compare_dirs /z/imaginations wildmutt:/z/imaginations
+sep 14
+
+sep 14
+echo "Comparing musix folder..."
+compare_dirs /z/musix wildmutt:/z/musix
+sep 14
+
+sep 14
+echo "Comparing walrus folder..."
+compare_dirs /z/walrus wildmutt:/z/walrus
+sep 14
--- /dev/null
+#!/bin/bash
+
+# musical_wand: distributes music from our primary source to all hosts that are listed
+# as being redundant copies for the music.
+
+# this script is designed to be run on the music host with the super alpha main source of
+# music plugged in as an external drive. that being said, it will still work as long as
+# the music host has its local copy intact; the local copy of the primary is always what
+# is synched onto the other archive hosts. in that sense, the musical host is itself a
+# musix archive, but it is treated "special".
+
+source "$FEISTY_MEOW_SCRIPTS/core/launch_feisty_meow.sh"
+
+#hmmm: add the goodness around these actions like the "nice" updater so we catch all errors.
+
+# this host is where all the music is supposed to come from.
+MUSICAL_HOST=curie
+
+#hmmm: this script is currently limited to run ON the music host. it could easily do the backwards thing instead, and copy FROM music host.
+
+# the list of hosts we know of that are holding onto duplicate copies of the musix archive.
+#old list MUSIX_ARCHIVE_SITE_LIST=(surya banshee wildmutt euphrosyne)
+MUSIX_ARCHIVE_SITE_LIST=(euphrosyne)
+#hmmm: list was contracted a lot, since we don't want to step on the updates done by syncthing. euphrosyne is still our reference copy for what the archive states "should" be.
+
+if [[ ! ( $(hostname) =~ .*${MUSICAL_HOST}.* ) ]]; then
+ echo "This script is only designed to run on $MUSICAL_HOST with the"
+ echo "primary fred music source (external) disc plugged in."
+ exit 1
+fi
+
+# synch our local copy on the music host with the primary music drive, source of all goodness.
+function get_music_from_alpha_site()
+{
+ sep
+ echo "getting musix and basement from fred music prime device"
+ rsync -av /media/fred/fredmusicprime/musix/* /z/musix/
+ rsync -av /media/fred/fredmusicprime/basement/* /z/basement/
+ sep
+ echo
+}
+
+# updates the music on a remote host to our current local copy on the music host.
+function update_musix_pile()
+{
+ sep
+ local host="$1"; shift
+ echo "$host: synching musix and basement"
+ rsync -avz /z/musix/* ${host}:/z/musix/
+ rsync -avz /z/basement/* ${host}:/z/basement/
+ sep
+ echo
+}
+
+##############
+
+# make sure the local machine, our first-stop musix host, is in good shape.
+get_music_from_alpha_site
+
+# run through the steps of updating all our machines.
+for i in ${MUSIX_ARCHIVE_SITE_LIST[@]}; do
+ update_musix_pile $i
+done
+
+
--- /dev/null
+#!/bin/bash
+
+source "$FEISTY_MEOW_SCRIPTS/core/launch_feisty_meow.sh"
+
+echo "Updating walrus and musix from surya: raw mode without syncthing!"
+echo
+
+for currdir in basement imaginations musix walrus; do
+ sep
+ echo "synching $currdir folder..."
+ rsync -avz surya:/z/$currdir/* /z/$currdir/
+done
+
+sep
+
--- /dev/null
+#!/bin/bash
+
+# updates the mounted barkuptree drive with stuff on wildmutt.
+# very specific currently.
+
+source "$FEISTY_MEOW_SCRIPTS/core/general_updater.sh"
+
+update_archive_drive /media/fred/barkuptreedrive
+
+#gone below
+
+# copy up the archived bluray discs, and possibly future archived formats.
+#netcp /z/archons/* $BARKY/bkup_archons/
+#test_or_die "synching archons"
+
+# copy over our somewhat attenuated but still important walrus archives.
+#netcp /z/walrus/* $BARKY/walrus/
+#test_or_die "synching walrus"
+
+# copy all the music files for future reference.
+#netcp /z/musix/* $BARKY/musix/
+#test_or_die "synching musix"
+
+# back up the photo archives.
+#netcp /z/imaginations/* $BARKY/imaginations/
+#test_or_die "synching imaginations"
+
+
--- /dev/null
+#!/bin/bash
+
+# updates local archive drive called catfurnose
+
+source "$FEISTY_MEOW_SCRIPTS/archival/general_updater.sh"
+
+update_archive_drive "/media/fred/catfurnose"
+
--- /dev/null
+#!/bin/bash
+
+# updates my little 1 TB "soapbox" style usb drive with items that it should contain.
+
+source "$FEISTY_MEOW_SCRIPTS/archival/general_updater.sh"
+
+update_archive_drive "/media/fred/fredmusicprime"
+
+exit $?
+
+#####old#####old#####
+#gone below.
+
+sep
+
+echo Target drive currently has...
+ls "$TARGET_FOLDER"
+if [ $? -ne 0 ]; then
+ echo "The target location '$TARGET_FOLDER' is not mounted currently, so cannot be updated."
+ exit 1
+fi
+
+# synch all our targets.
+for currdir in $ARCHIVE_COLLECTION_LIST; do
+ synch_directory_to_target "$currdir" "$TARGET_FOLDER/$(basename $currdir)"/
+done
+
+sep
+
+# update source code if present.
+echo getting latest fred repositories...
+pushd "$TARGET_FOLDER"
+update_source_folders $SOURCE_HIERARCHY_LIST
+
+sep
+
+echo Updated all expected portions of the targets successfully.
+
--- /dev/null
+#!/bin/bash
+
+# updates my little 1 TB "soapbox" style usb drive with items that it should contain.
+
+source "$FEISTY_MEOW_SCRIPTS/core/launch_feisty_meow.sh"
+source "$FEISTY_MEOW_SCRIPTS/archival/shared_updater_parts.sh"
+
+# where we're backing up to.
+TARGET_FOLDER="/media/fred/soapboxdrive"
+
+sep
+
+echo Target drive currently has...
+ls "$TARGET_FOLDER"
+if [ $? -ne 0 ]; then
+ echo "The target location '$TARGET_FOLDER' is not mounted currently, so cannot be updated."
+ exit 1
+fi
+
+# synch all our targets.
+for currdir in $ARCHIVE_COLLECTION_LIST; do
+ synch_directory_to_target "$currdir" "$TARGET_FOLDER/$(basename $currdir)"/
+done
+
+sep
+
+# update source code if present.
+echo getting latest fred repositories...
+pushd "$TARGET_FOLDER"
+for currdir in $SOURCE_HIERARCHY_LIST; do
+ update_source_folders "$curr_dir"
+done
+sep
+
+echo Updated all expected portions of the targets successfully.
+
+++ /dev/null
-#!/bin/bash
-
-# compares the soapbox with the real archive to see if any older stuff might be
-# left behind. if it's got a less than in front, then it's only on the soapbox drive
-# now rather than the pc's hard drive.
-
-source "$FEISTY_MEOW_SCRIPTS/core/launch_feisty_meow.sh"
-
-function compare_archives_with_target()
-{
- local target="$1"; shift
-
- for currdir in $ARCHIVE_COLLECTION_LIST; do
- sep
- echo "comparing '$currdir' with target '$target', where 'less thans' are on the target..."
- compare_dirs "$target/$(basename $currdir)" "$currdir"
- done
-}
-
-#hmmm: generalize this one also.
-
-compare_archives_with_target /media/fred/soapboxdrive
-
-sep
-
+++ /dev/null
-#!/bin/bash
-
-# runs through all the local archives on euphrosyne to make sure nothing is different
-# when compared to the mainline versions on surya.
-
-#hmmm: add a check that this is in fact the right host, euphrosyne.
-
-
-source "$FEISTY_MEOW_SCRIPTS/core/launch_feisty_meow.sh"
-
-sep 14
-echo "Comparing basement folder..."
-compare_dirs /z/basement wildmutt:/z/basement
-sep 14
-
-sep 14
-echo "Comparing imaginations folder..."
-compare_dirs /z/imaginations wildmutt:/z/imaginations
-sep 14
-
-sep 14
-echo "Comparing musix folder..."
-compare_dirs /z/musix wildmutt:/z/musix
-sep 14
-
-sep 14
-echo "Comparing walrus folder..."
-compare_dirs /z/walrus wildmutt:/z/walrus
-sep 14
+++ /dev/null
-#!/bin/bash
-
-# musical_wand: distributes music from our primary source to all hosts that are listed
-# as being redundant copies for the music.
-
-# this script is designed to be run on the music host with the super alpha main source of
-# music plugged in as an external drive. that being said, it will still work as long as
-# the music host has its local copy intact; the local copy of the primary is always what
-# is synched onto the other archive hosts. in that sense, the musical host is itself a
-# musix archive, but it is treated "special".
-
-source "$FEISTY_MEOW_SCRIPTS/core/launch_feisty_meow.sh"
-
-#hmmm: add the goodness around these actions like the "nice" updater so we catch all errors.
-
-# this host is where all the music is supposed to come from.
-MUSICAL_HOST=curie
-
-#hmmm: this script is currently limited to run ON the music host. it could easily do the backwards thing instead, and copy FROM music host.
-
-# the list of hosts we know of that are holding onto duplicate copies of the musix archive.
-#old list MUSIX_ARCHIVE_SITE_LIST=(surya banshee wildmutt euphrosyne)
-MUSIX_ARCHIVE_SITE_LIST=(euphrosyne)
-#hmmm: list was contracted a lot, since we don't want to step on the updates done by syncthing. euphrosyne is still our reference copy for what the archive states "should" be.
-
-if [[ ! ( $(hostname) =~ .*${MUSICAL_HOST}.* ) ]]; then
- echo "This script is only designed to run on $MUSICAL_HOST with the"
- echo "primary fred music source (external) disc plugged in."
- exit 1
-fi
-
-# synch our local copy on the music host with the primary music drive, source of all goodness.
-function get_music_from_alpha_site()
-{
- sep
- echo "getting musix and basement from fred music prime device"
- rsync -av /media/fred/fredmusicprime/musix/* /z/musix/
- rsync -av /media/fred/fredmusicprime/basement/* /z/basement/
- sep
- echo
-}
-
-# updates the music on a remote host to our current local copy on the music host.
-function update_musix_pile()
-{
- sep
- local host="$1"; shift
- echo "$host: synching musix and basement"
- rsync -avz /z/musix/* ${host}:/z/musix/
- rsync -avz /z/basement/* ${host}:/z/basement/
- sep
- echo
-}
-
-##############
-
-# make sure the local machine, our first-stop musix host, is in good shape.
-get_music_from_alpha_site
-
-# run through the steps of updating all our machines.
-for i in ${MUSIX_ARCHIVE_SITE_LIST[@]}; do
- update_musix_pile $i
-done
-
-
+++ /dev/null
-#!/bin/bash
-
-source "$FEISTY_MEOW_SCRIPTS/core/launch_feisty_meow.sh"
-
-echo "Updating walrus and musix from surya: raw mode without syncthing!"
-echo
-
-for currdir in basement imaginations musix walrus; do
- sep
- echo "synching $currdir folder..."
- rsync -avz surya:/z/$currdir/* /z/$currdir/
-done
-
-sep
-
+++ /dev/null
-#!/bin/bash
-
-# updates the mounted barkuptree drive with stuff on wildmutt.
-# very specific currently.
-
-source "$FEISTY_MEOW_SCRIPTS/core/launch_feisty_meow.sh"
-
-export BARKY=/media/fred/barkuptreedrive
-
-# copy up the archived bluray discs, and possibly future archived formats.
-netcp /z/archons/* $BARKY/bkup_archons/
-test_or_die "synching archons"
-
-# copy over our somewhat attenuated but still important walrus archives.
-netcp /z/walrus/* $BARKY/walrus/
-test_or_die "synching walrus"
-
-# copy all the music files for future reference.
-netcp /z/musix/* $BARKY/musix/
-test_or_die "synching musix"
-
-# back up the photo archives.
-netcp /z/imaginations/* $BARKY/imaginations/
-test_or_die "synching imaginations"
-
-
+++ /dev/null
-#!/bin/bash
-
-# updates my little 1 TB "soapbox" style usb drive with items that it should contain.
-
-source "$FEISTY_MEOW_SCRIPTS/core/launch_feisty_meow.sh"
-source "$FEISTY_MEOW_SCRIPTS/archival/shared_updater_parts.sh"
-
-# where we're backing up to.
-TARGET_FOLDER="/media/fred/fredmusicprime"
-
-sep
-
-echo Target drive currently has...
-ls "$TARGET_FOLDER"
-if [ $? -ne 0 ]; then
- echo "The target location '$TARGET_FOLDER' is not mounted currently, so cannot be updated."
- exit 1
-fi
-
-# synch all our targets.
-for currdir in $ARCHIVE_COLLECTION_LIST; do
- synch_directory_to_target "$currdir" "$TARGET_FOLDER/$(basename $currdir)"/
-done
-
-sep
-
-# update source code if present.
-echo getting latest fred repositories...
-pushd "$TARGET_FOLDER"
-update_source_folders $SOURCE_HIERARCHY_LIST
-
-sep
-
-echo Updated all expected portions of the targets successfully.
-
+++ /dev/null
-#!/bin/bash
-
-# updates my little 1 TB "soapbox" style usb drive with items that it should contain.
-
-source "$FEISTY_MEOW_SCRIPTS/core/launch_feisty_meow.sh"
-source "$FEISTY_MEOW_SCRIPTS/archival/shared_updater_parts.sh"
-
-# where we're backing up to.
-TARGET_FOLDER="/media/fred/soapboxdrive"
-
-sep
-
-echo Target drive currently has...
-ls "$TARGET_FOLDER"
-if [ $? -ne 0 ]; then
- echo "The target location '$TARGET_FOLDER' is not mounted currently, so cannot be updated."
- exit 1
-fi
-
-# synch all our targets.
-for currdir in $ARCHIVE_COLLECTION_LIST; do
- synch_directory_to_target "$currdir" "$TARGET_FOLDER/$(basename $currdir)"/
-done
-
-sep
-
-# update source code if present.
-echo getting latest fred repositories...
-pushd "$TARGET_FOLDER"
-for currdir in $SOURCE_HIERARCHY_LIST; do
- update_source_folders "$curr_dir"
-done
-sep
-
-echo Updated all expected portions of the targets successfully.
-