aboutsummaryrefslogtreecommitdiffstats
path: root/commands
diff options
context:
space:
mode:
Diffstat (limited to 'commands')
-rwxr-xr-xcommands/whatweb6
1 files changed, 4 insertions, 2 deletions
diff --git a/commands/whatweb b/commands/whatweb
index 1c1d779..c9aab29 100755
--- a/commands/whatweb
+++ b/commands/whatweb
@@ -1,5 +1,7 @@
#!/bin/sh
#wrapper for WhatWeb
-whatweb_bin='../repos/whatweb/whatweb'
-[ -e "$whatweb_bin" ] || ( echo "Whatweb app does not exist" && exit 1 )
+here=$(dirname `readlink -f $0`)
+whatweb_bin="$here/../repos/whatweb/whatweb"
+[ -e "$whatweb_bin" ] || ( echo "!! Whatweb app does not exist" && exit 1 )
+[ "balls$1" = "balls" ] && ( echo "!! no host given" && exit 1)
$whatweb_bin "$1"