diff options
| author | Denis Vlasenko <vda.linux@googlemail.com> | 2006-10-05 10:17:08 +0000 |
|---|---|---|
| committer | Denis Vlasenko <vda.linux@googlemail.com> | 2006-10-05 10:17:08 +0000 |
| commit | 7d219aab70e6951ab82c27c202cac05016696723 (patch) | |
| tree | 4c0679bfa391f71aee9b51505a5d3dc8f60a0cf7 /scripts/usage_compressed | |
| parent | 8f8f268cfdecb4cabeb2e649a73afc7a485aeff5 (diff) | |
| download | busybox-w32-7d219aab70e6951ab82c27c202cac05016696723.tar.gz busybox-w32-7d219aab70e6951ab82c27c202cac05016696723.tar.bz2 busybox-w32-7d219aab70e6951ab82c27c202cac05016696723.zip | |
build system overhaul
Diffstat (limited to 'scripts/usage_compressed')
| -rwxr-xr-x[-rw-r--r--] | scripts/usage_compressed | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/scripts/usage_compressed b/scripts/usage_compressed index 8e2228af2..ab164aa12 100644..100755 --- a/scripts/usage_compressed +++ b/scripts/usage_compressed | |||
| @@ -1,13 +1,19 @@ | |||
| 1 | #!/bin/sh | 1 | #!/bin/sh |
| 2 | 2 | ||
| 3 | loc="$1" | 3 | target="$1" |
| 4 | loc="$2" | ||
| 4 | 5 | ||
| 6 | test "$target" || exit 1 | ||
| 5 | test "$loc" || loc=. | 7 | test "$loc" || loc=. |
| 6 | test -x "$loc/usage" || exit 1 | 8 | test -x "$loc/usage" || exit 1 |
| 9 | test "$SED" || SED=sed | ||
| 10 | |||
| 11 | sz=`"$loc/usage" | wc -c` || exit 1 | ||
| 12 | |||
| 13 | exec >"$target" | ||
| 7 | 14 | ||
| 8 | echo 'static const char packed_usage[] = ' | 15 | echo 'static const char packed_usage[] = ' |
| 9 | "$loc"/usage | bzip2 -1 | od -v -t x1 \ | 16 | "$loc/usage" | bzip2 -1 | od -v -t x1 \ |
| 10 | | $SED -e 's/^[^ ]*//' -e 's/ \(..\)/\\x\1/g' -e 's/^\(.*\)$/"\1"/' || exit 1 | 17 | | $SED -e 's/^[^ ]*//' -e 's/ \(..\)/\\x\1/g' -e 's/^\(.*\)$/"\1"/' |
| 11 | echo ';' | 18 | echo ';' |
| 12 | sz=`"$loc"/usage | wc -c` || exit 1 | ||
| 13 | echo '#define SIZEOF_usage_messages' `expr 0 + $sz` | 19 | echo '#define SIZEOF_usage_messages' `expr 0 + $sz` |
