diff options
| author | Denys Vlasenko <vda.linux@googlemail.com> | 2010-06-05 23:11:07 +0200 |
|---|---|---|
| committer | Denys Vlasenko <vda.linux@googlemail.com> | 2010-06-05 23:11:07 +0200 |
| commit | 0e5ba0843b86a78d2d98a5fbaac8d33fe041f10e (patch) | |
| tree | 1f043ab8b4f8e1e57ddaf49e0ddf7677fedf7689 /applets/usage_compressed | |
| parent | 729ce473609fbe2aef656e6079d6b8a102962004 (diff) | |
| download | busybox-w32-0e5ba0843b86a78d2d98a5fbaac8d33fe041f10e.tar.gz busybox-w32-0e5ba0843b86a78d2d98a5fbaac8d33fe041f10e.tar.bz2 busybox-w32-0e5ba0843b86a78d2d98a5fbaac8d33fe041f10e.zip | |
Remove requirement that include/applets.h must be sorted
First, I _again_ violated it - two xz-related applets are in wrong positions.
Second, planned in-applet help text thing will be so much easier without
this requirement...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'applets/usage_compressed')
| -rwxr-xr-x | applets/usage_compressed | 22 |
1 files changed, 14 insertions, 8 deletions
diff --git a/applets/usage_compressed b/applets/usage_compressed index 8d343529d..12efd2c9c 100755 --- a/applets/usage_compressed +++ b/applets/usage_compressed | |||
| @@ -9,12 +9,19 @@ test -x "$loc/usage" || exit 1 | |||
| 9 | test "$SED" || SED=sed | 9 | test "$SED" || SED=sed |
| 10 | test "$DD" || DD=dd | 10 | test "$DD" || DD=dd |
| 11 | 11 | ||
| 12 | sz=`"$loc/usage" | wc -c` || exit 1 | ||
| 13 | |||
| 14 | exec >"$target" | 12 | exec >"$target" |
| 15 | 13 | ||
| 16 | echo 'static const char packed_usage[] ALIGN1 = {' | 14 | echo '#define UNPACKED_USAGE \' |
| 15 | "$loc/usage" | od -v -t x1 \ | ||
| 16 | | $SED -e 's/^[^ ]*//' \ | ||
| 17 | -e 's/ //g' \ | ||
| 18 | -e '/^$/d' \ | ||
| 19 | -e 's/\(..\)/\\x\1/g' \ | ||
| 20 | -e 's/^/"/' \ | ||
| 21 | -e 's/$/" \\/' | ||
| 22 | echo '' | ||
| 17 | 23 | ||
| 24 | echo '#define PACKED_USAGE \' | ||
| 18 | ## Breaks on big-endian systems! | 25 | ## Breaks on big-endian systems! |
| 19 | ## # Extra effort to avoid using "od -t x1": -t is not available | 26 | ## # Extra effort to avoid using "od -t x1": -t is not available |
| 20 | ## # in non-CONFIG_DESKTOPed busybox od | 27 | ## # in non-CONFIG_DESKTOPed busybox od |
| @@ -24,12 +31,11 @@ echo 'static const char packed_usage[] ALIGN1 = {' | |||
| 24 | ## -e 's/ //g' \ | 31 | ## -e 's/ //g' \ |
| 25 | ## -e '/^$/d' \ | 32 | ## -e '/^$/d' \ |
| 26 | ## -e 's/\(..\)\(..\)/0x\2,0x\1,/g' | 33 | ## -e 's/\(..\)\(..\)/0x\2,0x\1,/g' |
| 27 | 34 | ## -e 's/$/ \\/' | |
| 28 | "$loc/usage" | bzip2 -1 | $DD bs=2 skip=1 2>/dev/null | od -v -t x1 \ | 35 | "$loc/usage" | bzip2 -1 | $DD bs=2 skip=1 2>/dev/null | od -v -t x1 \ |
| 29 | | $SED -e 's/^[^ ]*//' \ | 36 | | $SED -e 's/^[^ ]*//' \ |
| 30 | -e 's/ //g' \ | 37 | -e 's/ //g' \ |
| 31 | -e '/^$/d' \ | 38 | -e '/^$/d' \ |
| 32 | -e 's/\(..\)/0x\1,/g' | 39 | -e 's/\(..\)/0x\1,/g' \ |
| 33 | 40 | -e 's/$/ \\/' | |
| 34 | echo '};' | 41 | echo '' |
| 35 | echo '#define SIZEOF_usage_messages' `expr 0 + $sz` | ||
