From 0730a707da94ff30b94c1f7829c8d247ddf0eeb2 Mon Sep 17 00:00:00 2001 From: Aaron Griffin Date: Tue, 2 Sep 2008 00:18:28 -0500 Subject: Correctly remove old sourceballs without removing the wrong files Signed-off-by: Aaron Griffin --- db-functions | 1 + misc-scripts/make-sourceball | 8 +++++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/db-functions b/db-functions index bcc25bb..25bca78 100644 --- a/db-functions +++ b/db-functions @@ -41,6 +41,7 @@ getpkgname() { tmp=${1##*/} tmp=${tmp%$PKGEXT} + tmp=${tmp%$SRCEXT} tmp=${tmp%-$CARCH} echo ${tmp%-*-*} } diff --git a/misc-scripts/make-sourceball b/misc-scripts/make-sourceball index ea5ef49..7f75fe8 100755 --- a/misc-scripts/make-sourceball +++ b/misc-scripts/make-sourceball @@ -52,7 +52,13 @@ create_srcpackage() { if [ ! -d "$srcpath" ]; then mkdir -p "$srcpath" fi - rm -f "$srcpath/${pkgname}-*-*${SRCEXT}" + #Remove old sourceballs + for pkg in "$srcpath/$pkgname-*"; do + pkg="$(basename $pkg)" + if "$(getpkgname $pkg)" == "$pkgname" ]; then + rm -f "$srcpath/$pkg" + fi + done cp $pkg_file "$srcpath" return 0 -- cgit v1.2.3-24-g4f1b