aboutsummaryrefslogtreecommitdiff
path: root/scripts/auto-build
diff options
context:
space:
mode:
authorHans-Christoph Steiner <eighthave@users.sourceforge.net>2009-03-01 23:38:10 +0000
committerHans-Christoph Steiner <eighthave@users.sourceforge.net>2009-03-01 23:38:10 +0000
commitd01b1ab35c3684951c90956c82840300e5778b98 (patch)
tree50307f1b623437930cc3189074dbdb525baa7648 /scripts/auto-build
parenta730d607eb190887c7dd33484dd036d752d30d38 (diff)
added chroots to automatic builds
svn path=/trunk/; revision=10825
Diffstat (limited to 'scripts/auto-build')
-rwxr-xr-xscripts/auto-build/run-automated-builder29
1 files changed, 20 insertions, 9 deletions
diff --git a/scripts/auto-build/run-automated-builder b/scripts/auto-build/run-automated-builder
index 0bb4cc19..cbb92a5e 100755
--- a/scripts/auto-build/run-automated-builder
+++ b/scripts/auto-build/run-automated-builder
@@ -33,20 +33,26 @@ mailbody_on_failure () {
run_build_script ()
{
distro=$1
+ chroot=$2
+ BUILDSCRIPT="${BUILDSCRIPT}"
## LATER: make the uploaded ${LOGFILE} (name) be consistent with the uploaded package-file (name)
- LOGFILE=${HOME}/logs/${DATE}_${TIME}_${SYSTEM}_${HOSTNAME}_${distro}_${SCRIPT}.txt
- touch ${LOGFILE}
-
- sh ${HOME}/auto-build/${distro}/scripts/auto-build/${distro}-auto-builder.sh >> $LOGFILE 2>&1
+ LOGFILE="${HOME}/logs/${DATE}_${TIME}_${SYSTEM}_${HOSTNAME}_${distro}_${BUILDSCRIPT}.txt"
+ touch "${LOGFILE}"
+ if [ -d /var/chroot/$chroot ]; then
+ dchroot -c $chroot -d "$BUILDSCRIPT" >> "$LOGFILE" 2>&1
+ else
+ sh "$BUILDSCRIPT" >> "$LOGFILE" 2>&1
+ fi
+
case $SYSTEM in
mingw*)
/c/cygwin/bin/sh -c \
"rsync -a ${LOGFILE} rsync://128.238.56.50/upload/${DATE}/logs/"
;;
*)
- rsync -a ${LOGFILE} rsync://128.238.56.50/upload/${DATE}/logs/
+ rsync -a "$LOGFILE" rsync://128.238.56.50/upload/${DATE}/logs/
;;
esac
@@ -61,10 +67,15 @@ run_build_script ()
fi
}
-for dir in ${HOME}/auto-build/*; do
- dirname=$(echo $dir | sed 's|.*/\(.*\)|\1|')
- test -e $dir/scripts/auto-build/${dirname}-auto-builder.sh && \
- run_build_script $dirname
+for distrodir in ${HOME}/auto-build/*; do
+ distro=$(echo $distrodir | sed 's|.*/\(.*\)|\1|')
+ if [ -e $distrodir/scripts/auto-build/${distro}-auto-builder.sh ]; then
+ run_build_script $distro IGNORE_CHROOT_USE_SYSTEM
+ for chrootdir in /var/chroot/*; do
+ chroot=$(echo $chrootdir | sed 's|.*/\(.*\)|\1|')
+ run_build_script $distro $chroot
+ done
+ fi
done
# since the above test can cause this script to exit with an error, force it