From 97a98b977494da23d1d2f7aa0cc11b0a7dc94616 Mon Sep 17 00:00:00 2001 From: Julian Freeman Date: Thu, 26 Feb 2026 13:45:45 -0400 Subject: [PATCH] add sh --- gen_combined.sh | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 gen_combined.sh diff --git a/gen_combined.sh b/gen_combined.sh new file mode 100644 index 0000000..e3cdc34 --- /dev/null +++ b/gen_combined.sh @@ -0,0 +1,26 @@ +#!/bin/bash + +if [ -z "$1" ] || [ -z "$2" ]; then + echo "Usage: $0 " + echo "Example: $0 md5_files/mybackup.md5 /Users/yourname/Backup" + exit 1 +fi + +MD5_PATH="$1" +TARGET_DIR="$2" + +FILENAME=$(basename "$MD5_PATH") + +FILE_BASENAME="${FILENAME%.*}" +COMBINED_FILE="${FILE_BASENAME}.txt" + +mkdir -p "combined_files" + +echo "Running ./rclone check ..." +./rclone check "$MD5_PATH" "$TARGET_DIR" --local-encoding "None" --exclude-from "exclude-list.txt" --checkfile "md5" --combined "combined_files/$COMBINED_FILE" + +if [ $? -eq 0 ]; then + echo "Success: Saved to "combined_files/$COMBINED_FILE"" +else + echo "Note: rclone check finished (return value might be different)" +fi