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
This commit is contained in:
Adrian Schröter 2011-03-25 07:35:21 +00:00 committed by Git OBS Bridge
parent 529653743c
commit 61a722e069

16
tar_scm
View File

@ -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."