- reuse strings and messages. Saves about 600B
[oweals/busybox.git] / scripts / usage_compressed
index ce672db3bbc34a9da60baf7ed2bd9746e16c442c..8e2228af2f34e924722dcdc43bd87f60f5ddd671 100644 (file)
@@ -6,7 +6,8 @@ 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"/'
+"$loc"/usage | bzip2 -1 | od -v -t x1 \
+| $SED -e 's/^[^ ]*//' -e 's/ \(..\)/\\x\1/g' -e 's/^\(.*\)$/"\1"/' || exit 1
 echo ';'
-echo '#define SIZEOF_usage_messages' $((0 + `"$loc"/usage | wc -c `))
+sz=`"$loc"/usage | wc -c` || exit 1
+echo '#define SIZEOF_usage_messages' `expr 0 + $sz`