summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHolger Levsen <holger@layer-acht.org>2012-11-12 09:24:32 +0100
committerHolger Levsen <holger@layer-acht.org>2012-11-12 09:24:32 +0100
commitfb6d71f538e15f735b10e183181770c77fdbf008 (patch)
treecade6000df78d3124c7dc92b2b568432cec0b997
parentafd959b281847ff50214b73b9b72cfef3a7ba1bc (diff)
downloadjenkins.debian.net-fb6d71f538e15f735b10e183181770c77fdbf008.tar.xz
convert params to variables
-rwxr-xr-xbin/d-i_parse_logs.sh11
1 files changed, 7 insertions, 4 deletions
diff --git a/bin/d-i_parse_logs.sh b/bin/d-i_parse_logs.sh
index e4b676dd..9814e42c 100755
--- a/bin/d-i_parse_logs.sh
+++ b/bin/d-i_parse_logs.sh
@@ -3,8 +3,6 @@
# Copyright 2012 Holger Levsen <holger@layer-acht.org>
# released under the GPLv=2
-# $1 = URL
-
if [ "$1" == "" ] ; then
echo "need at least one URL to act on"
echo '# $1 = URL'
@@ -12,6 +10,11 @@ if [ "$1" == "" ] ; then
fi
#
+# convert params to variables
+#
+URL=$1
+
+#
# default settings
#
#set -x
@@ -20,7 +23,7 @@ export LC_ALL=C
export http_proxy="http://localhost:3128"
TMPFILE=$(mktemp)
-curl $1 > $TMPFILE
+curl $URL > $TMPFILE
if [ $(grep -c failed $TMPFILE >/dev/null 2>&1) -gt 1 ] ; then
figlet Warning:
figlet failed builds:
@@ -35,4 +38,4 @@ echo Check $1 yourself
echo
sed -i -s 's#<img src="#<img src="http://d-i.debian.org/daily-images/#g' $TMPFILE
-mv $TMPFILE $(basename $1)
+mv $TMPFILE $(basename $URL)