summaryrefslogtreecommitdiff
path: root/scripts/ns2ip
diff options
context:
space:
mode:
authorIvo Smits <Ivo@UCIS.nl>2010-10-28 04:30:04 +0200
committerIvo Smits <Ivo@UCIS.nl>2010-10-28 04:30:04 +0200
commita5fce947aad6e06ff0ae3415a5fa5f336f4241d9 (patch)
tree95e5b3eea527e64e1a9f9d8015747b0e0a10aebc /scripts/ns2ip
parente2ac0501bc244627ec3f1ee4eb0773e31667e5e8 (diff)
parente40a8a950fa1b493c244905d61e49e55e71d84d0 (diff)
downloadresdb-a5fce947aad6e06ff0ae3415a5fa5f336f4241d9.tar.gz
resdb-a5fce947aad6e06ff0ae3415a5fa5f336f4241d9.zip
Merge branch 'master' of git://git1.somerandomnick.ano
Diffstat (limited to 'scripts/ns2ip')
-rwxr-xr-xscripts/ns2ip15
1 files changed, 15 insertions, 0 deletions
diff --git a/scripts/ns2ip b/scripts/ns2ip
new file mode 100755
index 0000000..ff5bf2b
--- /dev/null
+++ b/scripts/ns2ip
@@ -0,0 +1,15 @@
+#!/bin/sh
+
+opt="$1"
+if [ "x$opt" = "x-f" ]; then
+ shift
+elif ! ./scripts/check_db_safety; then
+ exit 1
+fi
+ns="$1"
+
+path="`find db/dom/ -ipath '*/ns/'\"$ns\" -size +1c | head -n 1`"
+if [ "x$path" = "x" ]; then
+ exit 1
+fi
+cat "$path"