import support for microblaze relocations from uClinux-dist
[oweals/busybox.git] / scripts / usage_compressed
1 #!/bin/sh
2
3 loc="$1"
4
5 test "$loc" || loc=.
6 test -x "$loc/usage" || exit 1
7
8 echo 'static const char packed_usage[] = '
9 "$loc"/usage | bzip2 -1 | od -v -t x1 \
10 | $SED -e 's/^[^ ]*//' -e 's/ \(..\)/\\x\1/g' -e 's/^\(.*\)$/"\1"/' || exit 1
11 echo ';'
12 sz=`"$loc"/usage | wc -c` || exit 1
13 echo '#define SIZEOF_usage_messages' `expr 0 + $sz`