Vorflop-exakt AWS: shasum ohne -L, Pruefung der Summe

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Marc Mintel
2026-12-05 15:25:34 +01:00
co-authored by Claude Opus 5.5
parent 5da7027e13
commit efdb14ac55
2 changed files with 4 additions and 2 deletions
+3 -1
View File
@@ -52,7 +52,9 @@ EINGABEN=("$TAFEL" "$EIN/eichung-agg.json" "$EIN/e2-n20000.bin" "$EIN/e3-n2000.b
: > "$P/eingabe.sha256"
for f in "${EINGABEN[@]}"; do
[ -e "$f" ] || { echo "Eingabe fehlt: $f" >&2; exit 1; }
echo "$(shasum -a 256 -L "$f" | cut -d' ' -f1) $(basename "$f")" >> "$P/eingabe.sha256"
h="$(shasum -a 256 "$f" | cut -d' ' -f1)"
[ "${#h}" = 64 ] || { echo "SHA256 von $f nicht berechenbar" >&2; exit 1; }
echo "$h $(basename "$f")" >> "$P/eingabe.sha256"
done
cat "$P/eingabe.sha256"
+1 -1
View File
@@ -15,7 +15,7 @@ JA="${1:-}"
while read -r sha name; do
[ -z "$name" ] && continue
quelle="$EIN/$name"; [ "$name" = "$(basename "$TAFEL")" ] && quelle="$TAFEL"
[ "$(shasum -a 256 -L "$quelle" | cut -d' ' -f1)" = "$sha" ] || { echo "SHA256 von $quelle stimmt nicht zu eingabe.sha256" >&2; exit 1; }
[ "$(shasum -a 256 "$quelle" | cut -d' ' -f1)" = "$sha" ] || { echo "SHA256 von $quelle stimmt nicht zu eingabe.sha256" >&2; exit 1; }
lauf aws s3 cp --only-show-errors "$quelle" "$ZIEL/eingabe/$name"
done < "$HIER/eingabe.sha256"
lauf aws s3 cp --only-show-errors "$HIER/vorflop-aws.tar.gz" "$ZIEL/vorflop-aws.tar.gz"