From c52883fb4f09c7792e21459c5d4164a5903717ff Mon Sep 17 00:00:00 2001 From: Hans-Christoph Steiner Date: Fri, 21 Sep 2012 19:40:43 +0000 Subject: remove dead svn:externals so they can be replaced by new folders svn path=/trunk/; revision=16260 --- scripts/auto-build/auto-build-common | 16 ++++++++++++++++ scripts/auto-build/pd-extended-auto-builder.sh | 2 ++ 2 files changed, 18 insertions(+) (limited to 'scripts') diff --git a/scripts/auto-build/auto-build-common b/scripts/auto-build/auto-build-common index 5a522aff..9a970790 100644 --- a/scripts/auto-build/auto-build-common +++ b/scripts/auto-build/auto-build-common @@ -102,6 +102,21 @@ find_svn() fi } +remove_dead_svn_externals() +{ + svn=$(find_svn) + svn_externals=`$svn propget -R svn:externals "$1" | sed 's|^.* - ||' | awk '{print $1}'` + for external in `$svn status --no-ignore "$1" | grep '^[X?]' | awk '{print $2}'`; do + name=$(basename $external) + if [ -z "$(echo $svn_externals | grep $name)" ]; then + echo "Removing defunct svn:external '$name' at '$external'" + echo rm -rf "$external" + else + echo "not removing $external" + fi + done +} + clean_and_update_folder() { folder=$1 @@ -119,6 +134,7 @@ clean_and_update_folder() awk '{print $2}' | \ xargs rm -rf $svn update + $svn update -N $folder 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 478cc576..87f7fdb6 100755 --- a/scripts/auto-build/pd-extended-auto-builder.sh +++ b/scripts/auto-build/pd-extended-auto-builder.sh @@ -44,7 +44,9 @@ echo "build root: $auto_build_root_dir" make distclean # run first so the autotools Makefiles still exist for dir in $auto_build_root_dir/*; do clean_and_update_folder $dir + remove_dead_svn_externals $dir done +remove_dead_svn_externals $auto_build_root_dir cd "${auto_build_root_dir}/packages/$BUILD_DIR" make -C "${auto_build_root_dir}/packages" set_version -- cgit v1.2.1