Merge branch 'master' of feistymeow.org:feisty_meow
[feisty_meow.git] / scripts / customize / fred / scripts / disk_synch / update_soapbox.sh
1 #!/bin/bash
2
3 # updates my little 1 TB "soapbox" style usb drive with items that it should contain.
4
5 source "$FEISTY_MEOW_SCRIPTS/core/launch_feisty_meow.sh"
6 source "$FEISTY_MEOW_SCRIPTS/archival/shared_updater_parts.sh"
7
8 # where we're backing up to.
9 TARGET_FOLDER="/media/fred/soapboxdrive"
10
11 sep
12
13 echo Target drive currently has...
14 ls "$TARGET_FOLDER"
15 if [ $? -ne 0 ]; then
16   echo "The target location '$TARGET_FOLDER' is not mounted currently, so cannot be updated."
17   exit 1
18 fi
19
20 # synch all our targets.
21 for currdir in $ARCHIVE_COLLECTIONS_LIST; do
22   synch_directory_to_target "$currdir" "$TARGET_FOLDER/$(basename $currdir)"/
23 done
24
25 sep
26
27 # update source code if present.
28 echo getting latest fred repositories...
29 pushd "$TARGET_FOLDER"
30 update_source_folders extra_brain
31
32 sep
33
34 echo Updated all expected portions of the targets successfully.
35