source: drbl_ui/backup/test_busybox/busybox-1.7.2/applets/usage_compressed

Last change on this file was 20, checked in by chris, 17 years ago
File size: 409 bytes
Line 
1#!/bin/sh
2
3target="$1"
4loc="$2"
5
6test "$target" || exit 1
7test "$loc" || loc=.
8test -x "$loc/usage" || exit 1
9test "$SED" || SED=sed
10
11sz=`"$loc/usage" | wc -c` || exit 1
12
13exec >"$target"
14
15echo 'static const char packed_usage[] ALIGN1 = '
16"$loc/usage" | bzip2 -1 | od -v -t x1 \
17| $SED -e 's/^[^ ]*//' -e 's/  *\(..\)/\\x\1/g' -e 's/^\(.*\)$/"\1"/'
18echo ';'
19echo '#define SIZEOF_usage_messages' `expr 0 + $sz`
Note: See TracBrowser for help on using the repository browser.