diff options
Diffstat (limited to 'unrpyc/find-gzip.sh')
-rwxr-xr-x | unrpyc/find-gzip.sh | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/unrpyc/find-gzip.sh b/unrpyc/find-gzip.sh index 2ee9064..cb65dc9 100755 --- a/unrpyc/find-gzip.sh +++ b/unrpyc/find-gzip.sh @@ -1,13 +1,11 @@ #!/bin/sh -ZOPFLI="$(command -v zopfli)" -GZIP="$(command -v gzip)" -if [ -n $ZOPFLI ]; then - echo "$ZOPFLI" -elif [ -n $GZIP ]; then +if command -v zopfli; then + printf "%s" "$(command -v zopfli)" +elif command -v gzip; then echo >&2 "Consider obtaining zopfli (https://code.google.com/p/zopfli/)" echo >&2 "for higher compression ratios (about 5% decrease in size of" - echo >&2 "script.json.gz." - echo "$GZIP -9" + echo >&2 "script.json.gz)." + printf "%s" "$(command -v gzip) -9" else echo >&2 "Could not find zopfli or gzip, aborting." exit 1 |