mirror of
https://git.sr.ht/~seirdy/seirdy.one
synced 2024-12-25 02:02:11 +00:00
9 lines
192 B
Bash
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
|