Consolidate pipeline scripts under stages

This commit is contained in:
Codex authored and howard committed 2026-09-25 22:56:20 +12:00
1 parent bd95f57b6e
commit cef7a4ac7b
4 files changed
+9 -9

No files matched your search

+2 -2
View File
@@ -10,7 +10,7 @@ while [[ $# -gt 0 ]]; do
--containers|-f) CONTAINERS_OVERRIDE="${2:?Missing containers file}"; shift ;;
-h|--help)
echo "Usage: ${0##*/} [--dry-run] [--containers FILE] [--skip-containers] [--skip-prune]"
echo "Methods run in BACKUP_METHODS order. Add methods/NN-name.sh and list name in BACKUP_METHODS."
echo "Transfer stages run in BACKUP_METHODS order. Add stages/NN-name.sh and list name in BACKUP_METHODS."
exit 0 ;;
*) die "Unknown option: $1" 2 ;;
esac
@@ -59,7 +59,7 @@ fi
method_args=(); (( DRY_RUN )) && method_args+=(--dry-run)
for method in $BACKUP_METHODS; do
method_script=""
while IFS= read -r candidate; do method_script="$candidate"; break; done < <(find "$SCRIPT_DIR/methods" -maxdepth 1 -type f -name "*-${method}.sh" -print | sort)
while IFS= read -r candidate; do method_script="$candidate"; break; done < <(find "$SCRIPT_DIR/stages" -maxdepth 1 -type f -name "*-${method}.sh" -print | sort)
[[ -n "$method_script" ]] || die "Configured backup method not found: $method"
"$method_script" "${method_args[@]}"
done