aboutsummaryrefslogtreecommitdiff
path: root/scripts/usage_compressed
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/usage_compressed')
-rw-r--r--scripts/usage_compressed11
1 files changed, 11 insertions, 0 deletions
diff --git a/scripts/usage_compressed b/scripts/usage_compressed
new file mode 100644
index 000000000..fa12e4063
--- /dev/null
+++ b/scripts/usage_compressed
@@ -0,0 +1,11 @@
+#!/bin/sh
+
+loc="$1"
+
+test "$loc" || loc=.
+
+echo 'static const char packed_usage[] = '
+"$loc"/usage | bzip2 -9 | od -v -t x1 \
+| sed -e 's/^[^ ]*//' -e 's/ \(..\)/\\x\1/g' -e 's/^\(.*\)$/"\1"/'
+echo ';'
+echo '#define SIZEOF_usage_messages' $((0 + `"$loc"/usage | wc -c `))