mirror of
https://github.com/sheumann/hush.git
synced 2024-12-23 05:29:58 +00:00
7fca7e3378
- use the portable `` instead of $(). There is no bbsh, so this is needed.
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`
|