mirror of
https://github.com/sheumann/hush.git
synced 2024-08-20 04:28:57 +00:00
14 lines
332 B
Bash
14 lines
332 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"/' || exit 1
|
|
echo ';'
|
|
sz=`"$loc"/usage | wc -c` || exit 1
|
|
echo '#define SIZEOF_usage_messages' `expr 0 + $sz`
|