summaryrefslogtreecommitdiff
path: root/scripts/cidr2hex
diff options
context:
space:
mode:
authorcathugger <cathugger@cock.li>2017-03-10 03:30:16 +0000
committercathugger <cathugger@cock.li>2017-03-10 03:30:16 +0000
commit7e5469a0dee1fbaf661720fc330d47d992f1d8fe (patch)
treed5f8a16a1ae8e390103e35a77d975e3157115236 /scripts/cidr2hex
parent9ec38bd2c56d112e49360c4f8be92900c998205c (diff)
downloadresdb-7e5469a0dee1fbaf661720fc330d47d992f1d8fe.tar.gz
resdb-7e5469a0dee1fbaf661720fc330d47d992f1d8fe.zip
add muh nameserver, some script tweaks
Diffstat (limited to 'scripts/cidr2hex')
-rwxr-xr-xscripts/cidr2hex4
1 files changed, 3 insertions, 1 deletions
diff --git a/scripts/cidr2hex b/scripts/cidr2hex
index 36974e0..7a84522 100755
--- a/scripts/cidr2hex
+++ b/scripts/cidr2hex
@@ -4,4 +4,6 @@ if [ x"$1" = x ]; then
echo "Usage: $0 <cidr>" >&2; exit 255
fi
-./scripts/ip2hex "$(./scripts/cidr2ip "$1")"
+dn=$(dirname "$0")
+ip=$("$dn"/cidr2ip "$1") || exit 1
+"$dn"/ip2hex "$ip"