From 61a722e069dffd12f4c1339db2116092451aceb590a57a79bdf9949d400ad73b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adrian=20Schr=C3=B6ter?= Date: Fri, 25 Mar 2011 07:35:21 +0000 Subject: [PATCH] Accepting request 65121 from home:ammler:branches:openSUSE:Tools thanks OBS-URL: https://build.opensuse.org/request/show/65121 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Tools/obs-service-tar_scm?expand=0&rev=13 --- tar_scm | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/tar_scm b/tar_scm index d0ec24c..1a79a4d 100644 --- a/tar_scm +++ b/tar_scm @@ -81,6 +81,7 @@ if [ -z "$MYOUTDIR" ]; then exit 1 fi +SRCDIR=$(pwd) cd "$MYOUTDIR" if [ -z "$FILE" -a "$MYSCM" == "git" ]; then @@ -97,7 +98,7 @@ if [ -z "$FILE" -a "$MYSCM" == "hg" ]; then FILE="${FILE##*/}" fi -existing_tar=$(echo _service:*tar_scm:${FILE}-*.tar*) +existing_tar=$(echo $SRCDIR/_service:*tar_scm:${FILE}-*.tar*) if [ -e "$existing_tar" ]; then UNCOMPRESS="cat" if [ "${existing_tar%.tar.gz}" != "$existing_tar" ]; then @@ -190,9 +191,6 @@ elif [ "$MYSCM" == "hg" ]; then cd "$TAR_DIRECTORY" OLDVERSION=`hg id -i -rtip` hg pull || exit 1 - if [ -n "$MYREVISION" ]; then - hg update "$MYREVISION" || exit 1 - fi NEWVERSION=`hg id -i -rtip` cd - if [ "$OLDVERSION" == "$NEWVERSION" ]; then @@ -204,12 +202,12 @@ elif [ "$MYSCM" == "hg" ]; then else # new checkout hg clone "$MYURL" "${FILE}" || exit 1 - if [ -n "$MYREVISION" ]; then - cd "$FILE" - hg update "$MYREVISION" || exit 1 - cd - - fi fi + if [ -n "$MYREVISION" ]; then + cd "$FILE" + hg update "$MYREVISION" || exit 1 + cd - + fi if [ -z "$VERSION" ]; then cd "$FILE" [ -n "$MYPREFIX" ] && MYPREFIX="$MYPREFIX."