summaryrefslogtreecommitdiff
path: root/misc-scripts/sourceballs-cleanup
diff options
context:
space:
mode:
authorPierre Schmitz <pierre@archlinux.de>2010-11-21 11:38:48 +0100
committerPierre Schmitz <pierre@archlinux.de>2010-11-21 11:38:48 +0100
commit42197d1f0f313f3608b8656662347d00885e6b5c (patch)
treec8bedc4a205732a3c18804ab13f5e963cd92ae81 /misc-scripts/sourceballs-cleanup
parente5539fc65872aa98d510a03d1e20c207ca6ed058 (diff)
sourceballs: check if PKGBUILD exists
Diffstat (limited to 'misc-scripts/sourceballs-cleanup')
-rwxr-xr-xmisc-scripts/sourceballs-cleanup10
1 files changed, 7 insertions, 3 deletions
diff --git a/misc-scripts/sourceballs-cleanup b/misc-scripts/sourceballs-cleanup
index fc5f649..f75c688 100755
--- a/misc-scripts/sourceballs-cleanup
+++ b/misc-scripts/sourceballs-cleanup
@@ -14,9 +14,13 @@ remove_old() {
PKGVERS=""
for repo in *; do
cd "$repo"
- pkgver=$(. PKGBUILD; echo ${pkgver})
- pkgrel=$(. PKGBUILD; echo ${pkgrel})
- PKGVERS="$PKGVERS $pkgver-$pkgrel"
+ if [ -f PKGBUILD ]; then
+ pkgver=$(. PKGBUILD; echo ${pkgver})
+ pkgrel=$(. PKGBUILD; echo ${pkgrel})
+ PKGVERS="$PKGVERS $pkgver-$pkgrel"
+ else
+ error "PKGBUILD not found in $1/$repo"
+ fi
cd ..
done