aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBernhard Reutner-Fischer <rep.dot.nop@gmail.com>2009-10-27 17:05:31 +0100
committerDenys Vlasenko <vda.linux@googlemail.com>2009-10-27 17:06:32 +0100
commitb35e3a8612ae10391e3f72ba90a4ca9e7180a9d2 (patch)
treeaab10e13e3ab134ff1dd2a7d778a3ae910bc482d
parent21a542d7d732735a522c413c0c385e577528ec63 (diff)
downloadbusybox-w32-b35e3a8612ae10391e3f72ba90a4ca9e7180a9d2.tar.gz
busybox-w32-b35e3a8612ae10391e3f72ba90a4ca9e7180a9d2.tar.bz2
busybox-w32-b35e3a8612ae10391e3f72ba90a4ca9e7180a9d2.zip
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>
-rwxr-xr-xapplets/usage_compressed15
1 files changed, 8 insertions, 7 deletions
diff --git a/applets/usage_compressed b/applets/usage_compressed
index 00c5735fa..a299ecdf1 100755
--- a/applets/usage_compressed
+++ b/applets/usage_compressed
@@ -7,6 +7,7 @@ test "$target" || exit 1
7test "$loc" || loc=. 7test "$loc" || loc=.
8test -x "$loc/usage" || exit 1 8test -x "$loc/usage" || exit 1
9test "$SED" || SED=sed 9test "$SED" || SED=sed
10test "$DD" || DD=dd
10 11
11sz=`"$loc/usage" | wc -c` || exit 1 12sz=`"$loc/usage" | wc -c` || exit 1
12 13
@@ -20,15 +21,15 @@ echo 'static const char packed_usage[] ALIGN1 = {'
20## 21##
21## "$loc/usage" | bzip2 -1 | od -v -x \ 22## "$loc/usage" | bzip2 -1 | od -v -x \
22## | $SED -e 's/^[^ ]*//' \ 23## | $SED -e 's/^[^ ]*//' \
23## | $SED -e 's/ //g' \ 24## -e 's/ //g' \
24## | grep -v '^$' \ 25## -e '/^$/d' \
25## | $SED -e 's/\(..\)\(..\)/0x\2,0x\1,/g' 26## -e 's/\(..\)\(..\)/0x\2,0x\1,/g'
26 27
27"$loc/usage" | bzip2 -1 | dd bs=2 skip=1 | od -v -t x1 \ 28"$loc/usage" | bzip2 -1 | $DD bs=2 skip=1 2>/dev/null | od -v -t x1 \
28| $SED -e 's/^[^ ]*//' \ 29| $SED -e 's/^[^ ]*//' \
29| $SED -e 's/ //g' \ 30 -e 's/ //g' \
30| grep -v '^$' \ 31 -e '/^$/d' \
31| $SED -e 's/\(..\)/0x\1,/g' 32 -e 's/\(..\)/0x\1,/g'
32 33
33echo '};' 34echo '};'
34echo '#define SIZEOF_usage_messages' `expr 0 + $sz` 35echo '#define SIZEOF_usage_messages' `expr 0 + $sz`