Files
gnucash/packaging/win32/weekly_build_git.sh
T
Geert Janssens f19c9ab34f Win32 automated build: add note about Windows' restriction on updating
files that are in use in every file that can be affected.

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@22317 57a11ea4-9604-0410-9ed3-97b8803252fd
2012-08-16 09:37:19 +00:00

36 lines
1.0 KiB
Bash

#!/bin/sh
#
# Notes:
# 1. for this script to work, git must have been setup before
# in a way that doesn't conflict with the GnuCash build.
# The easiest way to do so is to run the build once manually
# with a properly set up custom.sh.
#
# 2. Should this script change in the source repository, then the
# git pull below will fail due to a limitation in Windows that
# won't allow to change a file that is "in use". So in the rare
# situation this script needs to be updated, you will need to
# run the git pull once yourself.
set -e
## Only run this script on Monday night (first day of the week)
if [ `date +%u` != 1 ] ; then exit ; fi
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
# Variables
_GIT_UDIR=`unix_path $GIT_DIR`
set_env "$_GIT_UDIR/bin/git" GIT_CMD
export $GIT_CMD
$GIT_CMD pull
./build_package.sh
qpopd