Magellan Linux

Annotation of /trunk/mkinitrd-magellan/busybox/applets/usage_compressed

Parent Directory Parent Directory | Revision Log Revision Log


Revision 816 - (hide annotations) (download)
Fri Apr 24 18:33:46 2009 UTC (15 years ago) by niro
File size: 732 byte(s)
-updated to busybox-1.13.4
1 niro 532 #!/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    
11     sz=`"$loc/usage" | wc -c` || exit 1
12    
13     exec >"$target"
14    
15 niro 816 echo 'static const char packed_usage[] ALIGN1 = {'
16    
17     ## Breaks on big-endian systems!
18     ## # Extra effort to avoid using "od -t x1": -t is not available
19     ## # in non-CONFIG_DESKTOPed busybox od
20     ##
21     ## "$loc/usage" | bzip2 -1 | od -v -x \
22     ## | $SED -e 's/^[^ ]*//' \
23     ## | $SED -e 's/ //g' \
24     ## | grep -v '^$' \
25     ## | $SED -e 's/\(..\)\(..\)/0x\2,0x\1,/g'
26    
27 niro 532 "$loc/usage" | bzip2 -1 | od -v -t x1 \
28 niro 816 | $SED -e 's/^[^ ]*//' \
29     | $SED -e 's/ //g' \
30     | grep -v '^$' \
31     | $SED -e 's/\(..\)/0x\1,/g'
32    
33     echo '};'
34 niro 532 echo '#define SIZEOF_usage_messages' `expr 0 + $sz`

Properties

Name Value
svn:executable *