hush/scripts/usage_compressed
Bernhard Reutner-Fischer a1e130f122 - check for existing usage binary, so it get's more obvious that the toplevel
Makefile uses the wrong path to the binary (it's in top_builddir and not in top_srcdir)
2006-05-21 10:45:01 +00:00

13 lines
303 B
Bash

#!/bin/sh
loc="$1"
test "$loc" || loc=.
test -x "$loc/usage" || exit 1
echo 'static const char packed_usage[] = '
"$loc"/usage | bzip2 -9 | od -v -t x1 \
| sed -e 's/^[^ ]*//' -e 's/ \(..\)/\\x\1/g' -e 's/^\(.*\)$/"\1"/'
echo ';'
echo '#define SIZEOF_usage_messages' $((0 + `"$loc"/usage | wc -c `))