summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--modules/dev.inc2
1 files changed, 2 insertions, 0 deletions
diff --git a/modules/dev.inc b/modules/dev.inc
index 6d66678..fcde631 100644
--- a/modules/dev.inc
+++ b/modules/dev.inc
@@ -236,6 +236,8 @@ __init() {
hexdump -ve '/4 "%02x"' | sed 's/\(........\)\(........\)/\2\1/'
fi
}
+ elif [ "$( printf z2345678 | xxd -g 8 | cut -d' ' -f2 | awk '{ for (i=length-1;i>0;i-=2)x=x substr($0,i,2);}END{print x}' )" = "$t" ]; then
+ __bin2hex_le() { xxd -g "$1" | cut -d' ' -f2 | awk '{ for (i=length-1;i>0;i-=2)x=x substr($0,i,2);}END{print x}'; }
else
echo "No suitable tool for converting binary data to little endian hex" >&2
exit 1