support old tar bar lookup also for OBS 2.3 bs_service using .old/ directory

OBS-URL: https://build.opensuse.org/package/show/openSUSE:Tools/obs-service-tar_scm?expand=0&rev=23
This commit is contained in:
Adrian Schröter 2011-08-26 06:49:49 +00:00 committed by Git OBS Bridge
parent b7cffa8bf1
commit 00917f3eef
2 changed files with 11 additions and 1 deletions

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Fri Aug 26 06:49:13 UTC 2011 - adrian@suse.de
- support old tar bar lookup also for OBS 2.3 bs_service using .old/ directory
-------------------------------------------------------------------
Fri Aug 26 06:45:17 UTC 2011 - adrian@suse.de

View File

@ -115,7 +115,12 @@ if [ -z "$FILE" -a "$MYSCM" == "hg" ]; then
FILE="${FILE##*/}"
fi
existing_tar=$(echo $SRCDIR/_service:*tar_scm:${FILE}-*.tar*)
# Try to find an existing tar ball, which can be upgraded instead of complete full download.
existing_tar=$(echo $SRCDIR/.old/_service:*tar_scm:${FILE}-*.tar*)
if [ ! -e "$existing_tar" ]; then
# for OBS < 2.3
existing_tar=$(echo $SRCDIR/_service:*tar_scm:${FILE}-*.tar*)
fi
if [ -e "$existing_tar" ]; then
UNCOMPRESS="cat"
if [ "${existing_tar%.tar.gz}" != "$existing_tar" ]; then