mirror of
https://github.com/sheumann/hush.git
synced 2025-08-09 09:25:33 +00:00
fix byte-swapping of compressed help on big-endian machines
This commit is contained in:
@@ -14,14 +14,21 @@ exec >"$target"
|
|||||||
|
|
||||||
echo 'static const char packed_usage[] ALIGN1 = {'
|
echo 'static const char packed_usage[] ALIGN1 = {'
|
||||||
|
|
||||||
# Extra effort to avoid using "od -t x1": -t is not available
|
## Breaks on big-endian systems!
|
||||||
# in non-CONFIG_DESKTOPed busybox od
|
## # Extra effort to avoid using "od -t x1": -t is not available
|
||||||
|
## # in non-CONFIG_DESKTOPed busybox od
|
||||||
|
##
|
||||||
|
## "$loc/usage" | bzip2 -1 | od -v -x \
|
||||||
|
## | $SED -e 's/^[^ ]*//' \
|
||||||
|
## | $SED -e 's/ //g' \
|
||||||
|
## | grep -v '^$' \
|
||||||
|
## | $SED -e 's/\(..\)\(..\)/0x\2,0x\1,/g'
|
||||||
|
|
||||||
"$loc/usage" | bzip2 -1 | od -v -x \
|
"$loc/usage" | bzip2 -1 | od -v -t x1 \
|
||||||
| $SED -e 's/^[^ ]*//' \
|
| $SED -e 's/^[^ ]*//' \
|
||||||
| $SED -e 's/ //g' \
|
| $SED -e 's/ //g' \
|
||||||
| grep -v '^$' \
|
| grep -v '^$' \
|
||||||
| $SED -e 's/\(..\)\(..\)/0x\2,0x\1,/g'
|
| $SED -e 's/\(..\)/0x\1,/g'
|
||||||
|
|
||||||
echo '};'
|
echo '};'
|
||||||
echo '#define SIZEOF_usage_messages' `expr 0 + $sz`
|
echo '#define SIZEOF_usage_messages' `expr 0 + $sz`
|
||||||
|
Reference in New Issue
Block a user