X-Git-Url: https://feistymeow.org/gitweb/?p=feisty_meow.git;a=blobdiff_plain;f=scripts%2Farchival%2Fcompare_backup_drive.sh;h=501bfc9795ecc7feb1162ff3974fb9542c0e7921;hp=711200bda1756daa6b1e48b43a894eb0515c1a01;hb=ec0607714e0846cbf25687be2c915eb28b521f4c;hpb=409ea4b67304c6b62694b1ddba50662f77af3f3d diff --git a/scripts/archival/compare_backup_drive.sh b/scripts/archival/compare_backup_drive.sh index 711200bd..501bfc97 100644 --- a/scripts/archival/compare_backup_drive.sh +++ b/scripts/archival/compare_backup_drive.sh @@ -10,28 +10,31 @@ function compare_archives_with_target() { local target="$1"; shift +echo compare arch with target: $target + for currdir in $MAJOR_ARCHIVE_SOURCES; do sep echo "comparing '$currdir' with target '$target', where 'less thans' are on the target..." - compare_dirs "$target/$(basename $currdir)" "$currdir" +echo would do-- compare_dirs "$target/$(basename $currdir)" "$currdir" done } # decide which drive to compare. targets="$1" if [ -z "$targets" ]; then - targets=($($(which ls) -1 /media/$USERNAME)) + targets=($($(which ls) -1 /media/$USER/*)) if [ ${#targets[@]} -gt 1 ]; then echo " Please provide a media drive name on the command line, because more than one possibility exists. " + exit 1 fi fi echo "comparing the media drive '${targets[0]}' against local archives." -compare_archives_with_target "/media/$USERNAME/${targets[0]}" +compare_archives_with_target "/media/$USER/${targets[0]}" sep