summaryrefslogtreecommitdiffstats
path: root/misc-scripts/sourceballs-cleanup
diff options
context:
space:
mode:
authorPierre Schmitz <pierre@archlinux.de>2010-11-21 10:07:59 +0100
committerPierre Schmitz <pierre@archlinux.de>2010-11-21 10:07:59 +0100
commite5539fc65872aa98d510a03d1e20c207ca6ed058 (patch)
tree35f6704ad2b22837995c9e20c60d59e565a2f4ac /misc-scripts/sourceballs-cleanup
parent6dc2b46cc17fcac93d3ed1758edd53222631e849 (diff)
downloaddbscripts-e5539fc65872aa98d510a03d1e20c207ca6ed058.tar.gz
dbscripts-e5539fc65872aa98d510a03d1e20c207ca6ed058.tar.xz
sourceballs: fix error handling
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