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