kiwi-longtime-waterfall/xz_safe.sh

15 lines
167 B
Bash
Raw Normal View History

#!/bin/bash
set -euo pipefail
INPUT="$1"
OUTPUT="$INPUT.xz"
xz --keep "$INPUT"
sync
if xz -t "$OUTPUT"; then
rm "$INPUT"
else
echo "Test of '$OUTPUT' failed!"
fi