From b560577cb27a4a15a5e1a77d3ac720d2151d3d60 Mon Sep 17 00:00:00 2001 From: Denis Vlasenko Date: Thu, 19 Oct 2006 22:12:47 +0000 Subject: move usage_compressed.h generation into applets/ --- applets/usage_compressed | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100755 applets/usage_compressed (limited to 'applets/usage_compressed') diff --git a/applets/usage_compressed b/applets/usage_compressed new file mode 100755 index 000000000..ab164aa12 --- /dev/null +++ b/applets/usage_compressed @@ -0,0 +1,19 @@ +#!/bin/sh + +target="$1" +loc="$2" + +test "$target" || exit 1 +test "$loc" || loc=. +test -x "$loc/usage" || exit 1 +test "$SED" || SED=sed + +sz=`"$loc/usage" | wc -c` || exit 1 + +exec >"$target" + +echo 'static const char packed_usage[] = ' +"$loc/usage" | bzip2 -1 | od -v -t x1 \ +| $SED -e 's/^[^ ]*//' -e 's/ \(..\)/\\x\1/g' -e 's/^\(.*\)$/"\1"/' +echo ';' +echo '#define SIZEOF_usage_messages' `expr 0 + $sz` -- cgit v1.2.3