From e63d3527be547bc635be289533a6a1d223a07c78 Mon Sep 17 00:00:00 2001 From: Nick Date: Mon, 19 Apr 2010 08:40:20 +0000 Subject: rewrote hex2dec to no longer require bc --- scripts/hex2dec | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'scripts/hex2dec') diff --git a/scripts/hex2dec b/scripts/hex2dec index 7b66be9..bf5d82d 100755 --- a/scripts/hex2dec +++ b/scripts/hex2dec @@ -1,9 +1,17 @@ #!/bin/sh ( - echo -n "ibase=16; " + if [ x"$USE_BC" = x1 ]; then + echo -n "ibase=16; " + fi if [ x"$1" = x ]; then cat else echo "$1" fi -) | bc -q +) | ( + if [ x"$USE_BC" = x1 ]; then + bc -q + else + cat ./scripts/hex2dec.d/"$(cat)" + fi +) -- cgit v1.2.3