diff options
-rw-r--r-- | scripts/auto-build/auto-build-common | 16 | ||||
-rwxr-xr-x | scripts/auto-build/pd-extended-auto-builder.sh | 2 |
2 files changed, 18 insertions, 0 deletions
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 |