From a903d6d96a4174e255ea08be4d7feade26fb8440 Mon Sep 17 00:00:00 2001 From: Hans-Christoph Steiner Date: Fri, 31 Aug 2012 18:41:26 +0000 Subject: update directly from git and svn servers, rather than rsyncing svn path=/trunk/; revision=16186 --- scripts/auto-build/auto-build-common | 25 +++++++++++++++++++++---- 1 file changed, 21 insertions(+), 4 deletions(-) (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 f76c683f..bfc0a671 100644 --- a/scripts/auto-build/auto-build-common +++ b/scripts/auto-build/auto-build-common @@ -28,11 +28,11 @@ fi ## 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 +if [ -e ${HOME}/auto-build-common.local ]; then + . ${HOME}/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 "Could not find local configuration in \"${HOME}/auto-build-common.local\"" + echo "Skipping... (see ${HOME}/auto-build-common for instructions)" echo fi @@ -78,3 +78,20 @@ rsync_distro() ;; esac } + +clean_and_update_folder() +{ + folder=$1 + cd $folder + if [ -d $folder/.git ]; then + git reset --hard + git clean -fdx + git pull + elif [ -d $folder/.svn ]; then + svn revert -R . + svn status --no-ignore | awk '{print $2}' | xargs rm -rf + svn update + else + echo "no cleaning done, unknown SCM" + fi +} -- cgit v1.2.1