summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAaron Griffin <aaronmgriffin@gmail.com>2009-09-25 00:01:08 +0200
committerAaron Griffin <aaronmgriffin@gmail.com>2009-09-25 00:01:08 +0200
commitde547b70c1b3f6dfc163d96318d6f915446bbc4c (patch)
treeb1be28495be7cfd0cfd1a7d9970f63344d87575c
parent588cbbff128c72ac1871c26f9503ee41ea59bdfd (diff)
downloaddbscripts-de547b70c1b3f6dfc163d96318d6f915446bbc4c.tar.gz
dbscripts-de547b70c1b3f6dfc163d96318d6f915446bbc4c.tar.xz
Fixed test for existence of split package sources
This patch also removes the unused CARCH variable. Signed-off-by: Eric BĂ©langer <snowmaniscool@gmail.com> [Aaron: Broke srcpkgbase logic into srcpkgname/srcpkgbase to make it more readable] Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
-rwxr-xr-xcron-jobs/sourceballs5
1 files changed, 3 insertions, 2 deletions
diff --git a/cron-jobs/sourceballs b/cron-jobs/sourceballs
index f285d7f..09b1df7 100755
--- a/cron-jobs/sourceballs
+++ b/cron-jobs/sourceballs
@@ -41,7 +41,6 @@ echo "Errors occured during run:" > "$srcbase/errors.txt"
for repo in $repos; do
for arch in ${ARCHES[@]} any; do
- export CARCH="$arch"
ftppath="$ftpbase/$repo/os/$arch"
if [ ! -d "$ftppath" ]; then
echo "FTP path does not exist: $ftppath" >2
@@ -54,6 +53,8 @@ for repo in $repos; do
srcpath="$srcbase/"
srcpkg="${pkg//$PKGEXT/$SRCEXT}"
srcpkg="${srcpkg//-$arch/}"
+ srcpkgname="${srcpkg%-*-*$SRCEXT}"
+ srcpkgbase="${srcpkg/$srcpkgname/$pkgbase}"
#Don't do anything for package in this 'blacklist'
if grep "^$pkgbase\$" "$dirname/sourceballs.skip" >/dev/null 2>&1; then
@@ -67,7 +68,7 @@ for repo in $repos; do
force="-f"
fi
- if [ ! -f "$srcpath$srcpkg" ]; then
+ if [ ! \( -f "$srcpath$srcpkg" -o -f "$srcpath$srcpkgbase" \) ]; then
if ! $dirname/../misc-scripts/make-sourceball $force \
$pkgbase $repo $arch 2>>"$srcbase/errors.txt"; then
FAILED_PKGS="$FAILED_PKGS $pkg"