diff options
Diffstat (limited to 'scripts/hex2dec')
-rwxr-xr-x | scripts/hex2dec | 12 |
1 files changed, 10 insertions, 2 deletions
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 +) |