mirror of
https://github.com/perfect-dark-pc-port/perfect_dark.git
synced 2026-10-24 00:02:43 +02:00
19 lines
428 B
Bash
Executable File
19 lines
428 B
Bash
Executable File
#!/bin/bash
|
|
|
|
size=$(stat --format="%s" $1)
|
|
|
|
test $size -gt 0 || exit 0
|
|
|
|
printf "0: 1173 %.6x" $size | xxd -r -g0
|
|
|
|
if [[ "$OSTYPE" == "linux-gnu"* ]]; then
|
|
# use supplied gzip 1.2.4 for Linux
|
|
gzipbin="tools/gzip"
|
|
else
|
|
# use system gzip on other systems
|
|
# NOTE: this might result in a non-matching file, but we don't really care
|
|
gzipbin="gzip -f"
|
|
fi
|
|
|
|
$gzipbin -c --no-name --best $1 | head --bytes=-8 | tail --bytes=+11
|