Win32: Add shell script for the automated nightly build.

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@18091 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
Christian Stimming 2009-05-27 14:09:48 +00:00
parent c83ad53c03
commit f170876956

33
packaging/win32/daily_build.sh Executable file
View File

@ -0,0 +1,33 @@
#!/bin/sh
set -e
function qpushd() { pushd "$@" >/dev/null; }
function qpopd() { popd >/dev/null; }
function unix_path() { echo "$*" | sed 's,^\([A-Za-z]\):,/\1,;s,\\,/,g'; }
qpushd "$(dirname $(unix_path "$0"))"
. functions.sh
. defaults.sh
set_default OUTPUT_DIR $GLOBAL_DIR\\output
LOGFILENAME=build-`date +'%Y-%m-%d'`.log
_OUTPUT_DIR=`unix_path $OUTPUT_DIR`
LOGFILE=${_OUTPUT_DIR}/${LOGFILENAME}
# Run the compile
./install.sh 2>&1 | tee ${LOGFILE}
# Create the installer
./dist.sh 2>&1 | tee -a ${LOGFILE}
# Copy the resulting installer into the output directory
_BUILD_UDIR=`unix_path $BUILD_DIR`
_GNUCASH_UDIR=`unix_path $GNUCASH_DIR`
PKG_VERSION=`grep PACKAGE_VERSION ${_BUILD_UDIR}/config.h | cut -d" " -f3 | cut -d\" -f2 `
SVN_REV=`grep GNUCASH_SVN_REV ${_BUILD_UDIR}/src/gnome-utils/gnc-svninfo.h | cut -d" " -f3 | cut -d\" -f2 `
SETUP_FILENAME="gnucash-${PKG_VERSION}-svn-r${SVN_REV}-setup.exe"
mv ${_GNUCASH_UDIR}/${SETUP_FILENAME} ${_OUTPUT_DIR}