15 lines
167 B
Bash
15 lines
167 B
Bash
|
#!/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
|