From 409ea4b67304c6b62694b1ddba50662f77af3f3d Mon Sep 17 00:00:00 2001 From: Fred Hamster Date: Sun, 12 May 2019 08:46:02 -0400 Subject: [PATCH] promotion of archival scripts to mainstream this generalizes some archive management scripts and gets them out of fred's custom area. --- .../compare_backup_drive.sh} | 18 +++++++++++++++--- .../scripts => }/archival/localz_comparator.sh | 0 .../fred/scripts => }/archival/raw_synch.sh | 0 .../scripts/archival/euphrosyne_comparator.sh | 6 ------ 4 files changed, 15 insertions(+), 9 deletions(-) rename scripts/{customize/fred/scripts/archival/compare_soapbox.sh => archival/compare_backup_drive.sh} (58%) rename scripts/{customize/fred/scripts => }/archival/localz_comparator.sh (100%) rename scripts/{customize/fred/scripts => }/archival/raw_synch.sh (100%) delete mode 100644 scripts/customize/fred/scripts/archival/euphrosyne_comparator.sh diff --git a/scripts/customize/fred/scripts/archival/compare_soapbox.sh b/scripts/archival/compare_backup_drive.sh similarity index 58% rename from scripts/customize/fred/scripts/archival/compare_soapbox.sh rename to scripts/archival/compare_backup_drive.sh index d4893737..711200bd 100644 --- a/scripts/customize/fred/scripts/archival/compare_soapbox.sh +++ b/scripts/archival/compare_backup_drive.sh @@ -17,9 +17,21 @@ function compare_archives_with_target() done } -#hmmm: generalize this one also. - -compare_archives_with_target /media/fred/soapboxdrive +# decide which drive to compare. +targets="$1" +if [ -z "$targets" ]; then + targets=($($(which ls) -1 /media/$USERNAME)) + if [ ${#targets[@]} -gt 1 ]; then + echo " +Please provide a media drive name on the command line, because more than +one possibility exists. +" + fi +fi + +echo "comparing the media drive '${targets[0]}' against local archives." + +compare_archives_with_target "/media/$USERNAME/${targets[0]}" sep diff --git a/scripts/customize/fred/scripts/archival/localz_comparator.sh b/scripts/archival/localz_comparator.sh similarity index 100% rename from scripts/customize/fred/scripts/archival/localz_comparator.sh rename to scripts/archival/localz_comparator.sh diff --git a/scripts/customize/fred/scripts/archival/raw_synch.sh b/scripts/archival/raw_synch.sh similarity index 100% rename from scripts/customize/fred/scripts/archival/raw_synch.sh rename to scripts/archival/raw_synch.sh diff --git a/scripts/customize/fred/scripts/archival/euphrosyne_comparator.sh b/scripts/customize/fred/scripts/archival/euphrosyne_comparator.sh deleted file mode 100644 index 32980c42..00000000 --- a/scripts/customize/fred/scripts/archival/euphrosyne_comparator.sh +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/bash - -source "$FEISTY_MEOW_SCRIPTS/core/launch_feisty_meow.sh" -source "$FEISTY_MEOW_SCRIPTS/archival/comparator.sh" - - -- 2.34.1