--- /dev/null
+#!/bin/bash
+
+# a script that handles synchronization of important assets from the ARCHIVE_COLLECTION_LIST
+# and the SOURCE_HIERARCHY_LIST onto a backup drive of some sort. it will only copy folders
+# 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"
+
+function update_archive_drive()
+{
+ local target_folder="$1"; shift
+ # where we're backing up to.
+
+ 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
+#hmmm:clean
+#extra_brain interbrane
+#need source list
+
+ sep
+
+ echo Updated all expected portions of the targets successfully.
+}
+
+
# the archive collections list is a set of directories that are major
# repositories of data which can be synched to backup drives.
- define_yeti_variable ARCHIVE_COLLECTIONS_LIST=
+ define_yeti_variable ARCHIVE_COLLECTION_LIST=
+ # the source collections list is a set of directories that indicate they
+ # harbor a lot of source code underneath.
+ define_yeti_variable SOURCE_HIERARCHY_LIST=
# initializes the feisty meow build variables, if possible.
function initialize_build_variables()
REPOSITORY_LIST+=" cloud ebooks web "
# adds our locally relevant archive folders into the list to be synched.
- ARCHIVE_COLLECTIONS_LIST+="/z/basement /z/imaginations /z/musix /z/toaster /z/walrus"
+ ARCHIVE_COLLECTION_LIST+="/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"
# point to our local certificate for ssh usage.
export SVN_SSH="ssh -i $HOME/.ssh/id_dsa_sourceforge"
done
}
+#hmmm: generalize this one also.
+
compare_archives_with_target /media/fred/soapboxdrive
sep
fi
# synch all our targets.
-for currdir in $ARCHIVE_COLLECTIONS_LIST; do
+for currdir in $ARCHIVE_COLLECTION_LIST; do
synch_directory_to_target "$currdir" "$TARGET_FOLDER/$(basename $currdir)"/
done
# update source code if present.
echo getting latest fred repositories...
pushd "$TARGET_FOLDER"
-update_source_folders extra_brain
+update_source_folders $SOURCE_HIERARCHY_LIST
sep
fi
# synch all our targets.
-for currdir in $ARCHIVE_COLLECTIONS_LIST; do
+for currdir in $ARCHIVE_COLLECTION_LIST; do
synch_directory_to_target "$currdir" "$TARGET_FOLDER/$(basename $currdir)"/
done
# update source code if present.
echo getting latest fred repositories...
pushd "$TARGET_FOLDER"
-update_source_folders extra_brain
-
+for currdir in $SOURCE_HIERARCHY_LIST; do
+ update_source_folders "$curr_dir"
+done
sep
echo Updated all expected portions of the targets successfully.