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