move usage_compressed.h generation into applets/

This commit is contained in:
Denis Vlasenko committed 2006-10-19 22:12:47 +00:00
1 parent 52b5eba715
commit b560577cb2
4 files changed
+6 -9

No files matched your search

+19
View File
@@ -0,0 +1,19 @@
#!/bin/sh
target="$1"
loc="$2"
test "$target" || exit 1
test "$loc" || loc=.
test -x "$loc/usage" || exit 1
test "$SED" || SED=sed
sz=`"$loc/usage" | wc -c` || exit 1
exec >"$target"
echo 'static const char packed_usage[] = '
"$loc/usage" | bzip2 -1 | od -v -t x1 \
| $SED -e 's/^[^ ]*//' -e 's/ \(..\)/\\x\1/g' -e 's/^\(.*\)$/"\1"/'
echo ';'
echo '#define SIZEOF_usage_messages' `expr 0 + $sz`