summaryrefslogtreecommitdiff
path: root/scripts/hex2dec
diff options
context:
space:
mode:
authorNick <nick@somerandomnick.ano>2010-04-19 08:40:20 +0000
committerNick <nick@somerandomnick.ano>2010-04-19 08:40:20 +0000
commite63d3527be547bc635be289533a6a1d223a07c78 (patch)
tree4ee9f0b8ac5822d750dd5ae100e8062f14f26404 /scripts/hex2dec
parentd36677106b32bae92fa7286a917d1b0f7abee5fd (diff)
downloadresdb-e63d3527be547bc635be289533a6a1d223a07c78.tar.gz
resdb-e63d3527be547bc635be289533a6a1d223a07c78.zip
rewrote hex2dec to no longer require bc
Diffstat (limited to 'scripts/hex2dec')
-rwxr-xr-xscripts/hex2dec12
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
+)