Author: thomas.diesler(a)jboss.com
Date: 2009-01-20 02:30:46 -0500 (Tue, 20 Jan 2009)
New Revision: 3680
Modified:
jbpm3/trunk/hudson/jboss/bin/http-spider.sh
Log:
simplify spider
Modified: jbpm3/trunk/hudson/jboss/bin/http-spider.sh
===================================================================
--- jbpm3/trunk/hudson/jboss/bin/http-spider.sh 2009-01-20 07:15:09 UTC (rev 3679)
+++ jbpm3/trunk/hudson/jboss/bin/http-spider.sh 2009-01-20 07:30:46 UTC (rev 3680)
@@ -18,21 +18,16 @@
SLEEP_TIME=10 # the actual sleep time in between test
NUM_RETRIES=18 # equals 180 seconds before exit
-if [ "x$1" = "x" ]; then
+if [ "x$1" = "x" -o "x$2" = "x" ]; then
echo "Usage: http-spider.sh <hostname:port> <output_dir>"
fi
-if [ "x$2" = "x" ]; then
- echo "Usage: http-spider.sh <hostname:port> <output_dir>"
-fi
-
# cleanup
rm $2/spider.success 2&>1 /dev/null
rm $2/spider.failed 2&>1 /dev/null
which wget > /dev/null
-WGET_EXISTS=$?
-if [ $WGET_EXISTS -e 0 ]; then
+if [ $? -eq 0 ]; then
COUNTER=0
while [ $COUNTER -lt $NUM_RETRIES ]; do
if wget --spider --timeout=$TIMEOUT --tries=1 $1 &> /dev/null; then