diff options
| author | Rob Landley <rob@landley.net> | 2006-04-27 23:34:46 +0000 |
|---|---|---|
| committer | Rob Landley <rob@landley.net> | 2006-04-27 23:34:46 +0000 |
| commit | 7e21d5f6b1bdac9c20139e8bef82b17559e548a0 (patch) | |
| tree | 08c1b12a37d2ef74b4471e154fe4227d3b6ae917 /scripts/usage_compressed | |
| parent | d5b9428bb6e9d7524f6ef24868ce6394ade08255 (diff) | |
| download | busybox-w32-7e21d5f6b1bdac9c20139e8bef82b17559e548a0.tar.gz busybox-w32-7e21d5f6b1bdac9c20139e8bef82b17559e548a0.tar.bz2 busybox-w32-7e21d5f6b1bdac9c20139e8bef82b17559e548a0.zip | |
Patch from Dennis Vlasenko to add the option to compress help text.
Diffstat (limited to 'scripts/usage_compressed')
| -rw-r--r-- | scripts/usage_compressed | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/scripts/usage_compressed b/scripts/usage_compressed new file mode 100644 index 000000000..fa12e4063 --- /dev/null +++ b/scripts/usage_compressed | |||
| @@ -0,0 +1,11 @@ | |||
| 1 | #!/bin/sh | ||
| 2 | |||
| 3 | loc="$1" | ||
| 4 | |||
| 5 | test "$loc" || loc=. | ||
| 6 | |||
| 7 | echo 'static const char packed_usage[] = ' | ||
| 8 | "$loc"/usage | bzip2 -9 | od -v -t x1 \ | ||
| 9 | | sed -e 's/^[^ ]*//' -e 's/ \(..\)/\\x\1/g' -e 's/^\(.*\)$/"\1"/' | ||
| 10 | echo ';' | ||
| 11 | echo '#define SIZEOF_usage_messages' $((0 + `"$loc"/usage | wc -c `)) | ||
