diff options
Diffstat (limited to 'misc-scripts/sourceballs-cleanup')
-rwxr-xr-x | misc-scripts/sourceballs-cleanup | 10 |
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 |