summaryrefslogtreecommitdiffstats
path: root/misc-scripts/sourceballs-cleanup
diff options
context:
space:
mode:
Diffstat (limited to 'misc-scripts/sourceballs-cleanup')
-rwxr-xr-xmisc-scripts/sourceballs-cleanup12
1 files changed, 8 insertions, 4 deletions
diff --git a/misc-scripts/sourceballs-cleanup b/misc-scripts/sourceballs-cleanup
index 788cc98..fc5f649 100755
--- a/misc-scripts/sourceballs-cleanup
+++ b/misc-scripts/sourceballs-cleanup
@@ -52,13 +52,17 @@ cd "$WORKDIR"
echo "Orphaned sourceballs:" > "$logfile"
for sourceball in "${FTP_BASE}/${SRCPOOL}"/*$SRCEXT; do
+ [ -f "$sourceball" ] || continue
packagename=$(basename $sourceball)
packagename=${packagename%-*-*$SRCEXT}
- if ! /usr/bin/svn export -q --force "$SVNREPO/$packagename" "$packagename" >/dev/null 2>&1 \
- && ! /usr/bin/svn export -q --force "$SVNREPOCOMMUNITY/$packagename" "$packagename" >/dev/null 2>&1 ; then
- echo "$packagename : no longer in svn. Removing sourceball." >> "$logfile"
- mv $sourceball $SOURCE_CLEANUP_DESTDIR
+ if ! /usr/bin/svn export -q --force "$SVNREPO/$packagename" "$packagename" >/dev/null 2>&1; then
+ if [ $? -ne 1 ]; then
+ echo "$packagename : svn died during export. Skipping sourceball." >> "$logfile"
+ else
+ echo "$packagename : no longer in svn. Removing sourceball." >> "$logfile"
+ mv $sourceball $SOURCE_CLEANUP_DESTDIR
+ fi
elif [ -z "$(ls -A "$packagename/repos")" ]; then
echo "$packagename : no longer in repos but trunk is still in svn. Removing sourceball." >> "$logfile"
mv $sourceball $SOURCE_CLEANUP_DESTDIR