1
0
Fork 0
mirror of https://git.sr.ht/~seirdy/seirdy.one synced 2024-09-19 20:02:10 +00:00
seirdy.one/scripts/ect-wrapper.sh
2023-11-26 15:54:48 -08:00

9 lines
192 B
Bash

#!/bin/sh
# compress a file with ect and preserve the mtime
# args: compression level and filename.
set -e -u
if [ ! -f "$2.gz" ]; then
ect -quiet -"$1" -gzip "$2"
touch -r "$2" "$2.gz"
fi