Contents of /tags/mkinitrd-6_2_3/busybox/applets/usage_compressed
Parent Directory | Revision Log
Revision 1054 -
(show annotations)
(download)
Mon May 31 20:54:44 2010 UTC (14 years, 3 months ago) by niro
File size: 749 byte(s)
Mon May 31 20:54:44 2010 UTC (14 years, 3 months ago) by niro
File size: 749 byte(s)
tagged 'mkinitrd-6_2_3'
1 | #!/bin/sh |
2 | |
3 | target="$1" |
4 | loc="$2" |
5 | |
6 | test "$target" || exit 1 |
7 | test "$loc" || loc=. |
8 | test -x "$loc/usage" || exit 1 |
9 | test "$SED" || SED=sed |
10 | test "$DD" || DD=dd |
11 | |
12 | sz=`"$loc/usage" | wc -c` || exit 1 |
13 | |
14 | exec >"$target" |
15 | |
16 | echo 'static const char packed_usage[] ALIGN1 = {' |
17 | |
18 | ## Breaks on big-endian systems! |
19 | ## # Extra effort to avoid using "od -t x1": -t is not available |
20 | ## # in non-CONFIG_DESKTOPed busybox od |
21 | ## |
22 | ## "$loc/usage" | bzip2 -1 | od -v -x \ |
23 | ## | $SED -e 's/^[^ ]*//' \ |
24 | ## -e 's/ //g' \ |
25 | ## -e '/^$/d' \ |
26 | ## -e 's/\(..\)\(..\)/0x\2,0x\1,/g' |
27 | |
28 | "$loc/usage" | bzip2 -1 | $DD bs=2 skip=1 2>/dev/null | od -v -t x1 \ |
29 | | $SED -e 's/^[^ ]*//' \ |
30 | -e 's/ //g' \ |
31 | -e '/^$/d' \ |
32 | -e 's/\(..\)/0x\1,/g' |
33 | |
34 | echo '};' |
35 | echo '#define SIZEOF_usage_messages' `expr 0 + $sz` |
Properties
Name | Value |
---|---|
svn:executable | * |