2006-04-27 23:34:46 +00:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
loc="$1"
|
|
|
|
|
|
|
|
test "$loc" || loc=.
|
2006-05-21 10:45:01 +00:00
|
|
|
test -x "$loc/usage" || exit 1
|
2006-04-27 23:34:46 +00:00
|
|
|
|
|
|
|
echo 'static const char packed_usage[] = '
|
2006-05-30 19:19:45 +00:00
|
|
|
"$loc"/usage | bzip2 -1 | od -v -t x1 \
|
2006-05-26 13:28:39 +00:00
|
|
|
| $SED -e 's/^[^ ]*//' -e 's/ \(..\)/\\x\1/g' -e 's/^\(.*\)$/"\1"/' || exit 1
|
2006-04-27 23:34:46 +00:00
|
|
|
echo ';'
|
2006-05-26 13:28:39 +00:00
|
|
|
sz=`"$loc"/usage | wc -c` || exit 1
|
|
|
|
echo '#define SIZEOF_usage_messages' `expr 0 + $sz`
|