forked from pool/obs-service-tar_scm
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:
parent
529653743c
commit
61a722e069
16
tar_scm
16
tar_scm
@ -81,6 +81,7 @@ if [ -z "$MYOUTDIR" ]; then
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
SRCDIR=$(pwd)
|
||||||
cd "$MYOUTDIR"
|
cd "$MYOUTDIR"
|
||||||
|
|
||||||
if [ -z "$FILE" -a "$MYSCM" == "git" ]; then
|
if [ -z "$FILE" -a "$MYSCM" == "git" ]; then
|
||||||
@ -97,7 +98,7 @@ if [ -z "$FILE" -a "$MYSCM" == "hg" ]; then
|
|||||||
FILE="${FILE##*/}"
|
FILE="${FILE##*/}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
existing_tar=$(echo _service:*tar_scm:${FILE}-*.tar*)
|
existing_tar=$(echo $SRCDIR/_service:*tar_scm:${FILE}-*.tar*)
|
||||||
if [ -e "$existing_tar" ]; then
|
if [ -e "$existing_tar" ]; then
|
||||||
UNCOMPRESS="cat"
|
UNCOMPRESS="cat"
|
||||||
if [ "${existing_tar%.tar.gz}" != "$existing_tar" ]; then
|
if [ "${existing_tar%.tar.gz}" != "$existing_tar" ]; then
|
||||||
@ -190,9 +191,6 @@ elif [ "$MYSCM" == "hg" ]; then
|
|||||||
cd "$TAR_DIRECTORY"
|
cd "$TAR_DIRECTORY"
|
||||||
OLDVERSION=`hg id -i -rtip`
|
OLDVERSION=`hg id -i -rtip`
|
||||||
hg pull || exit 1
|
hg pull || exit 1
|
||||||
if [ -n "$MYREVISION" ]; then
|
|
||||||
hg update "$MYREVISION" || exit 1
|
|
||||||
fi
|
|
||||||
NEWVERSION=`hg id -i -rtip`
|
NEWVERSION=`hg id -i -rtip`
|
||||||
cd -
|
cd -
|
||||||
if [ "$OLDVERSION" == "$NEWVERSION" ]; then
|
if [ "$OLDVERSION" == "$NEWVERSION" ]; then
|
||||||
@ -204,12 +202,12 @@ elif [ "$MYSCM" == "hg" ]; then
|
|||||||
else
|
else
|
||||||
# new checkout
|
# new checkout
|
||||||
hg clone "$MYURL" "${FILE}" || exit 1
|
hg clone "$MYURL" "${FILE}" || exit 1
|
||||||
if [ -n "$MYREVISION" ]; then
|
|
||||||
cd "$FILE"
|
|
||||||
hg update "$MYREVISION" || exit 1
|
|
||||||
cd -
|
|
||||||
fi
|
|
||||||
fi
|
fi
|
||||||
|
if [ -n "$MYREVISION" ]; then
|
||||||
|
cd "$FILE"
|
||||||
|
hg update "$MYREVISION" || exit 1
|
||||||
|
cd -
|
||||||
|
fi
|
||||||
if [ -z "$VERSION" ]; then
|
if [ -z "$VERSION" ]; then
|
||||||
cd "$FILE"
|
cd "$FILE"
|
||||||
[ -n "$MYPREFIX" ] && MYPREFIX="$MYPREFIX."
|
[ -n "$MYPREFIX" ] && MYPREFIX="$MYPREFIX."
|
||||||
|
Loading…
x
Reference in New Issue
Block a user