From 207b0206a0954c1b1da01091e52a49b74ac752ed Mon Sep 17 00:00:00 2001 From: Chris Koeritz Date: Wed, 31 Aug 2016 22:47:13 -0400 Subject: [PATCH] new script that updates my 1tb drive with the latest goods. --- customizing/fred/scripts/update_soapbox.sh | 72 ++++++++++++++++++++++ 1 file changed, 72 insertions(+) create mode 100644 customizing/fred/scripts/update_soapbox.sh diff --git a/customizing/fred/scripts/update_soapbox.sh b/customizing/fred/scripts/update_soapbox.sh new file mode 100644 index 00000000..e710e225 --- /dev/null +++ b/customizing/fred/scripts/update_soapbox.sh @@ -0,0 +1,72 @@ +#!/bin/bash + +# updates my little 1 TB "soapbox" style usb drive with items that it should contain. + +function liney() +{ + echo + echo ============== + echo +} + +function get_source() +{ + folder="$1"; shift + 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/rev_checkin.sh" + if [ $? -ne 0 ]; then + echo Checking out the latest codes has failed somehow for $folder. + exit 1 + fi + popd +} + +liney + +liney + +ls /media/fred/soapboxdrive +if [ $? -ne 0 ]; then + echo The soapbox drive is not mounted currently, so cannot be updated. + exit 1 +fi + +liney + +echo synching walrus... +rsync -av /z/walrus/* /media/fred/soapboxdrive/walrus/ +if [ $? -ne 0 ]; then + echo The walrus sync failed. + exit 1 +fi + +liney + +echo synching musix... +rsync -av /z/musix/* /media/fred/soapboxdrive/musix/ +if [ $? -ne 0 ]; then + echo The musix sync failed. + exit 1 +fi + +liney + +echo getting latest fred codes... +pushd /media/fred/soapboxdrive +get_source extra_brain + +liney + +echo getting latest gffs codes... +get_source gffs +popd + +liney + +echo Updated all portions of the soapbox drive successfully. + -- 2.34.1