FYI: ${SCRIPT_DIR} is never set to anything in your new changes to auto-build-common, so that auto-build-common.local will never be found unless it is in "/".
.hc
Modified Files: mail-mingw-log-hack.sh run-automated-builder Log Message: only send emails if RECIPIENT is defined
Index: run-automated-builder
RCS file: /cvsroot/pure-data/scripts/auto-build/run-automated- builder,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** run-automated-builder 27 Nov 2007 03:03:40 -0000 1.20 --- run-automated-builder 27 Nov 2007 20:49:22 -0000 1.21
*** 37,42 **** --- 37,44 ---- completion_test=`tail -1 ${LOGFILE}` if [ "x${completion_test}" != "xSUCCESS" ]; then
SUBJECT="autobuild: $distro $HOSTNAME $DATE $TIME" tail -20 ${LOGFILE} | mail -s "${SUBJECT}" ${RECIPIENT}if [ "x${RECIPIENT}" != "x" ]; then
fi }fi
Index: mail-mingw-log-hack.sh
RCS file: /cvsroot/pure-data/scripts/auto-build/mail-mingw-log- hack.sh,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** mail-mingw-log-hack.sh 22 Oct 2007 22:41:47 -0000 1.3 --- mail-mingw-log-hack.sh 27 Nov 2007 20:49:22 -0000 1.4
*** 12,17 **** --- 12,19 ---- completion_test=`tail -1 ${logfile}` if [ "x${completion_test}" != "xSUCCESS" ]; then
SUBJECT="autobuild: $distro $HOSTNAME $DATE $TIME" tail -20 ${logfile} | mail -s "autobuild: $logfile" ${RECIPIENT}if [ "x${RECIPIENT}" != "x" ]; then
fi donefi
Message: 4 Date: Tue, 27 Nov 2007 21:01:03 +0000 From: IOhannes m zmölnig zmoelnig@users.sourceforge.net Subject: [PD-cvs] scripts/auto-build auto-build-common,1.1,1.2 To: pd-cvs@iem.at Message-ID: mailman.9.1196247602.28024.pd-cvs@iem.at
Update of /cvsroot/pure-data/scripts/auto-build In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1086
Modified Files: auto-build-common Log Message: disabled the RECIPIENT by default and added some notes on how to enable it
Index: auto-build-common
RCS file: /cvsroot/pure-data/scripts/auto-build/auto-build-common,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** auto-build-common 18 Oct 2006 15:42:12 -0000 1.1 --- auto-build-common 27 Nov 2007 21:01:01 -0000 1.2
*** 6,10 **** TIME=`date +%H.%M.%S`
# recipient of any emails set from the scripts ! RECIPIENT=pd-cvs@iem.at
--- 6,29 ---- TIME=`date +%H.%M.%S`
- ## the following creates a spam-bot that sends emails to an
address that has not asked for it
- ## because of the spam-problem, i (jmz) have disabled it # recipient of any emails set from the scripts
! #RECIPIENT=pd-cvs@iem.at !
- ## if you want to send emails about the success of your build,
- ## please create a file "auto-build-common.local" in this directory
- ## and set the "RECIPIENT" address to some valid email-address
- #
- ## please do NOT check your auto-build-common.local into the CVS
- #
- ## another possibility is to set the "RECIPIENT" environmental
variable before running
- ## the autobuilder
- if [ -e ${SCRIPT_DIR}/auto-build-common.local ]; then
- . ${SCRIPT_DIR}/auto-build-common.local
- else
- echo "Could not find local configuration in "${SCRIPT_DIR}/
auto-build-common.local""
- echo "Skipping... (see ${SCRIPT_DIR}/auto-build-common for
instructions)"
- echo
- fi
------------------------------------------------------------------------ ----
All mankind is of one author, and is one volume; when one man dies, one chapter is not torn out of the book, but translated into a better language; and every chapter must be so translated.... -John Donne
Hans-Christoph Steiner wrote:
FYI: ${SCRIPT_DIR} is never set to anything in your new changes to auto-build-common, so that auto-build-common.local will never be found unless it is in "/".
this is of course bad. but why?
as i read the code: the autobuild-script sources ${SCRIPT_DIR}/auto-build-common (therefore i assume that ${SCRIPT_DIR} is set) ${SCRIPT_DIR}/auto-build-common sources ${SCRIPT_DIR}/auto-build-common.local since we are still in the original autobuild-script (we are only sourcing both auto-build-common and auto-build-common.local) ${SCRIPT_DIR} should be defined everywhere.
unless i did a typo, of course.
gmads IOhannes
IOhannes m zmoelnig wrote:
Hans-Christoph Steiner wrote:
FYI: ${SCRIPT_DIR} is never set to anything in your new changes to auto-build-common, so that auto-build-common.local will never be found unless it is in "/".
this is of course bad. but why?
as i read the code: the autobuild-script sources ${SCRIPT_DIR}/auto-build-common (therefore i assume that ${SCRIPT_DIR} is set) ${SCRIPT_DIR}/auto-build-common sources ${SCRIPT_DIR}/auto-build-common.local since we are still in the original autobuild-script (we are only sourcing both auto-build-common and auto-build-common.local) ${SCRIPT_DIR} should be defined everywhere.
unless i did a typo, of course.
after re-checking i see my assumptions confirmed (theoretically): all autobuild-script do source $SCRIPT_DIR/auto-build-common there should not be a difference between $SCRIPT_DIR and ${SCRIPT_DIR}.
after testing with a slightly modified version of scripts/auto-build/pd-extended-auto-builder.sh (that waits after all the sourceing stuff instead of running the build), i can confirm practically that the sourcing of auto-build-common.local works as intended.
what again was the problem?
fmadsr. IOhannes