aboutsummaryrefslogtreecommitdiff
path: root/scripts/auto-build
diff options
context:
space:
mode:
authorHans-Christoph Steiner <eighthave@users.sourceforge.net>2012-08-31 18:41:26 +0000
committerHans-Christoph Steiner <eighthave@users.sourceforge.net>2012-08-31 18:41:26 +0000
commita903d6d96a4174e255ea08be4d7feade26fb8440 (patch)
tree520bb0a12fc25a03f76da5d65fc315ebec2304a2 /scripts/auto-build
parentb4ef04a54868e37e774e79af349dda7adab25f4e (diff)
update directly from git and svn servers, rather than rsyncing
svn path=/trunk/; revision=16186
Diffstat (limited to 'scripts/auto-build')
-rw-r--r--scripts/auto-build/auto-build-common25
-rwxr-xr-xscripts/auto-build/pd-extended-auto-builder.sh8
2 files changed, 28 insertions, 5 deletions
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
+}
diff --git a/scripts/auto-build/pd-extended-auto-builder.sh b/scripts/auto-build/pd-extended-auto-builder.sh
index c3d5bbcc..4ec9b813 100755
--- a/scripts/auto-build/pd-extended-auto-builder.sh
+++ b/scripts/auto-build/pd-extended-auto-builder.sh
@@ -39,7 +39,13 @@ esac
cd "${SCRIPT_DIR}/../.."
auto_build_root_dir=`pwd`
echo "build root: $auto_build_root_dir"
-rsync_distro "$auto_build_root_dir"
+
+# clean up and update
+for dir in $auto_build_root_dir/*; do
+ clean_and_update_folder $dir
+done
+
+# get new stuff from the server
cd "${auto_build_root_dir}/packages/$BUILD_DIR"
make -C "${auto_build_root_dir}/packages" set_version