diff options
author | Bernhard Reutner-Fischer | 2009-10-27 17:05:31 +0100 |
---|---|---|
committer | Denys Vlasenko | 2009-10-27 17:06:32 +0100 |
commit | b35e3a8612ae10391e3f72ba90a4ca9e7180a9d2 (patch) | |
tree | aab10e13e3ab134ff1dd2a7d778a3ae910bc482d /applets/usage_compressed | |
parent | 21a542d7d732735a522c413c0c385e577528ec63 (diff) | |
download | busybox-b35e3a8612ae10391e3f72ba90a4ca9e7180a9d2.zip busybox-b35e3a8612ae10391e3f72ba90a4ca9e7180a9d2.tar.gz |
applets/usage_compressed: combine many seds in one; hide dd stats
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'applets/usage_compressed')
-rwxr-xr-x | applets/usage_compressed | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/applets/usage_compressed b/applets/usage_compressed index 00c5735..a299ecd 100755 --- a/applets/usage_compressed +++ b/applets/usage_compressed @@ -7,6 +7,7 @@ test "$target" || exit 1 test "$loc" || loc=. test -x "$loc/usage" || exit 1 test "$SED" || SED=sed +test "$DD" || DD=dd sz=`"$loc/usage" | wc -c` || exit 1 @@ -20,15 +21,15 @@ echo 'static const char packed_usage[] ALIGN1 = {' ## ## "$loc/usage" | bzip2 -1 | od -v -x \ ## | $SED -e 's/^[^ ]*//' \ -## | $SED -e 's/ //g' \ -## | grep -v '^$' \ -## | $SED -e 's/\(..\)\(..\)/0x\2,0x\1,/g' +## -e 's/ //g' \ +## -e '/^$/d' \ +## -e 's/\(..\)\(..\)/0x\2,0x\1,/g' -"$loc/usage" | bzip2 -1 | dd bs=2 skip=1 | od -v -t x1 \ +"$loc/usage" | bzip2 -1 | $DD bs=2 skip=1 2>/dev/null | od -v -t x1 \ | $SED -e 's/^[^ ]*//' \ -| $SED -e 's/ //g' \ -| grep -v '^$' \ -| $SED -e 's/\(..\)/0x\1,/g' + -e 's/ //g' \ + -e '/^$/d' \ + -e 's/\(..\)/0x\1,/g' echo '};' echo '#define SIZEOF_usage_messages' `expr 0 + $sz` |