summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHolger Levsen <holger@layer-acht.org>2012-11-22 00:28:46 +0100
committerHolger Levsen <holger@layer-acht.org>2012-11-22 00:28:46 +0100
commita2ad2f61c2ded037083cfa93f48951b90b1a2644 (patch)
tree2e55d6ec9883a11f69ace51498fe2daf53fecf33
parent5cfe126681d8f0e3e0e7dd29eb0b5b68297a5f28 (diff)
downloadjenkins.debian.net-a2ad2f61c2ded037083cfa93f48951b90b1a2644.tar.xz
some code cleanups
-rwxr-xr-xbin/d-i_manual.sh4
-rwxr-xr-xbin/email2irc.sh29
2 files changed, 19 insertions, 14 deletions
diff --git a/bin/d-i_manual.sh b/bin/d-i_manual.sh
index b1e29e2b..1ed8c92f 100755
--- a/bin/d-i_manual.sh
+++ b/bin/d-i_manual.sh
@@ -82,7 +82,9 @@ init_workspace
# if $1 is not given, build the whole manual,
# else just the language $1 in format $2
#
-# FIXME: use variable names
+# $1 = LANG
+# $2 = FORMAT
+# $3 if set, manual is translated using po files (else xml files are the default)
if [ "$1" = "" ] ; then
pdebuild_package
else
diff --git a/bin/email2irc.sh b/bin/email2irc.sh
index 3c02a71f..81017910 100755
--- a/bin/email2irc.sh
+++ b/bin/email2irc.sh
@@ -1,8 +1,12 @@
#!/bin/bash
+# Copyright 2012 Holger Levsen <holger@layer-acht.org>
+# released under the GPLv=2
+
#
-# FIXME: this needs cleanup soo much
+# FIXME: email2irc still needs cleanup / documentation
#
+LOGFILE=/var/lib/jenkins/email_log
HEADER=true
VALID_MAIL=false
@@ -19,9 +23,9 @@ while read line ; do
SUBJECT=${line:9}
fi
if [[ $line =~ ^(To: .*) ]] ; then
- echo $line >> /var/lib/jenkins/email_log
+ echo $line >> $LOGFILE
CHANNEL=$(echo $line | cut -d "+" -f2| cut -d "@" -f1)
- echo "CHANNEL = $CHANNEL" >> /var/lib/jenkins/email_log
+ echo "CHANNEL = $CHANNEL" >> $LOGFILE
fi
if [[ $line =~ ^(X-Jenkins-Job: .*) ]] ; then
JENKINS_JOB=${line:15}
@@ -37,20 +41,19 @@ if [ -z $JENKINS_JOB ] ; then
fi
if [ "$VALID_MAIL" == "true" ] ; then
- echo -e "----------\nvalid email\n-----------" >> /var/lib/jenkins/email_log
- echo $JENKINS_JOB | cut -d ":" -f1 >> /var/lib/jenkins/email_log
+ echo -e "----------\nvalid email\n-----------" >> $LOGFILE
+ echo $JENKINS_JOB | cut -d ":" -f1 >> $LOGFILE
SUBJECT=$(echo $SUBJECT | cut -d ":" -f1)
- echo $SUBJECT >> /var/lib/jenkins/email_log
- echo $FIRST_LINE >> /var/lib/jenkins/email_log
+ echo $SUBJECT >> $LOGFILE
+ echo $FIRST_LINE >> $LOGFILE
if [ ! -z $CHANNEL ] ; then
- echo "#$CHANNEL: $SUBJECT. $FIRST_LINE" >> /var/lib/jenkins/email_log
- kgb-client --conf /srv/jenkins/kgb/$CHANNEL.conf --relay-msg "$SUBJECT. $FIRST_LINE" && echo "kgb informed successfully." >> /var/lib/jenkins/email_log
- echo >> /var/lib/jenkins/email_log
+ echo "#$CHANNEL: $SUBJECT. $FIRST_LINE" >> $LOGFILE
+ kgb-client --conf /srv/jenkins/kgb/$CHANNEL.conf --relay-msg "$SUBJECT. $FIRST_LINE" && echo "kgb informed successfully." >> $LOGFILE
+ echo >> $LOGFILE
else
- echo "But no irc channel detected." >> /var/lib/jenkins/email_log
+ echo "But no irc channel detected." >> $LOGFILE
fi
else
- echo -e "----------\nbad luck\n-----------" >> /var/lib/jenkins/email_log
+ echo -e "----------\nbad luck\n-----------" >> $LOGFILE
fi
-# FIXME /var/lib/jenkins/email_log will grow and grow