1
0
Fork 0
mirror of https://git.sr.ht/~seirdy/seirdy.one synced 2024-12-26 02:22:09 +00:00
seirdy.one/scripts/ect-wrapper.sh

10 lines
192 B
Bash
Raw Normal View History

2023-11-26 23:54:48 +00:00
#!/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