From c2bf0092b165f600d8a14f234c3270e29acafd71 Mon Sep 17 00:00:00 2001 From: Hans-Christoph Steiner Date: Mon, 23 Mar 2009 20:51:08 +0000 Subject: - added direct mailing support for Cygwin 'email' via Windows/MinGW builds - added network debug info - made source rsync function and reverted Cygwin rsync to be the same as the UNIX ones. This means that it doesn't try to copy symlinks anymore. svn path=/trunk/; revision=10892 --- scripts/auto-build/auto-build-common | 44 ++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) (limited to 'scripts/auto-build/auto-build-common') diff --git a/scripts/auto-build/auto-build-common b/scripts/auto-build/auto-build-common index 0106a69f..96ddd805 100644 --- a/scripts/auto-build/auto-build-common +++ b/scripts/auto-build/auto-build-common @@ -1,3 +1,4 @@ +#!/bin/sh # these are common variables for the auto-build scripts SYSTEM=$(uname -s | sed 'y|ABCDEFGHIJKLMNOPQRSTUVWXYZ|abcdefghijklmnopqrstuvwxyz|') @@ -8,6 +9,8 @@ HOSTNAME=$(hostname | sed 's|\([a-zA-Z0-9-]\)\..*|\1|' | sed 'y|ABCDEFGHIJKLMNOP # use the hostname from /etc/hostname in case we are a chroot build enviroment if [ -e /etc/hostname ]; then HOSTNAME=`cat /etc/hostname` +else + HOSTNAME=$(hostname | sed 's|\([a-zA-Z0-9-]\)\..*|\1|' | sed 'y|ABCDEFGHIJKLMNOPQRSTUVWXYZ|abcdefghijklmnopqrstuvwxyz|') fi ## the following creates a spam-bot that sends emails to an address that has not asked for it @@ -32,3 +35,44 @@ else echo "Skipping... (see ${SCRIPT_DIR}/auto-build-common for instructions)" echo fi + +# cygwin/Mingw don't have 'mail', but do have 'email' which is close enough. +# To get around the troubles with mail servers, we'll contact the SMTP server +# of the mailing lists directly (mail.iem.at). +if [ -x `which email` ]; then + MAIL_COMMAND="email --smtp-server mail.iem.at" +else + MAIL_COMMAND=mail +fi + + +#------------------------------------------------------------------------------# +# print out ip addresses for debugging +print_ip_address() +{ + echo -n "hostname: " + hostname + echo "---------------------------" + if [ -x /sbin/ifconfig ]; then + /sbin/ifconfig + else + ipconfig + fi +} + + +rsync_distro() +{ +# let rsync handle the cleanup with --delete + DISTRO=$(basename $1) + echo "rsyncing $DISTRO to ${1}:" + RSYNC_COMMAND="rsync -a --delete rsync://128.238.56.50/distros/${DISTRO}/ ${1}/" + case $SYSTEM in + mingw*) + /c/cygwin/bin/sh -c "$RSYNC_COMMAND" + ;; + *) + echo $RSYNC_COMMAND + ;; + esac +} -- cgit v1.2.1