diff options
Diffstat (limited to 'scripts/auto-build/auto-build-common')
-rw-r--r-- | scripts/auto-build/auto-build-common | 16 |
1 files changed, 16 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 |