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/make-sourceball | 4 +++- misc-scripts/sourceballs-cleanup | 10 +++++++--- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/misc-scripts/make-sourceball b/misc-scripts/make-sourceball index bdf5f59..66d3dad 100755 --- a/misc-scripts/make-sourceball +++ b/misc-scripts/make-sourceball @@ -22,7 +22,7 @@ arch="$3" script_lock create_srcpackage() { - if [ -d "$1" ]; then + if [ -f "$1/PKGBUILD" ]; then pushd "$1" >/dev/null pkgver=$(. PKGBUILD; echo ${pkgver}) if [ $? -ne 0 ]; then @@ -62,6 +62,8 @@ create_srcpackage() { popd >/dev/null return 0 + else + error "PKGBUILD not found in $1" fi } 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