From 42197d1f0f313f3608b8656662347d00885e6b5c Mon Sep 17 00:00:00 2001 From: Pierre Schmitz Date: Sun, 21 Nov 2010 11:38:48 +0100 Subject: sourceballs: check if PKGBUILD exists --- misc-scripts/sourceballs-cleanup | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'misc-scripts/sourceballs-cleanup') 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 -- cgit v1.2.3-24-g4f1b