blob: ce672db3bbc34a9da60baf7ed2bd9746e16c442c [file] [log] [blame]
Rob Landley7e21d5f2006-04-27 23:34:46 +00001#!/bin/sh
2
3loc="$1"
4
5test "$loc" || loc=.
Bernhard Reutner-Fischera1e130f2006-05-21 10:45:01 +00006test -x "$loc/usage" || exit 1
Rob Landley7e21d5f2006-04-27 23:34:46 +00007
8echo 'static const char packed_usage[] = '
9"$loc"/usage | bzip2 -9 | od -v -t x1 \
10| sed -e 's/^[^ ]*//' -e 's/ \(..\)/\\x\1/g' -e 's/^\(.*\)$/"\1"/'
11echo ';'
12echo '#define SIZEOF_usage_messages' $((0 + `"$loc"/usage | wc -c `))