summaryrefslogtreecommitdiffstats
path: root/php-behat-mink-get-source.sh
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2020-03-17 15:33:29 +0100
committerRemi Collet <remi@remirepo.net>2020-03-17 15:33:29 +0100
commit1ec67a54adff45052e581bd66ea3c579d69a3a19 (patch)
tree8839ed6b5fd308f3be4a5d43a0d553435be8caa7 /php-behat-mink-get-source.sh
parent08a997c4b658e416525815b91a8bf26320798af1 (diff)
v1.8.1 from FedoraHEADmaster
Diffstat (limited to 'php-behat-mink-get-source.sh')
-rwxr-xr-xphp-behat-mink-get-source.sh9
1 files changed, 6 insertions, 3 deletions
diff --git a/php-behat-mink-get-source.sh b/php-behat-mink-get-source.sh
index 1d762fb..4a51e05 100755
--- a/php-behat-mink-get-source.sh
+++ b/php-behat-mink-get-source.sh
@@ -24,6 +24,10 @@ else
SPEC=`ls *.spec | head -1`
fi
+SPEC_DIR=`pwd`
+
+print "SPEC_DIR = $SPEC_DIR"
+
NAME=`echo $SPEC | sed 's#\.spec##'`
VERSION=`egrep '%global\s*github_version' $SPEC | awk '{print $3}'`
@@ -43,8 +47,6 @@ print "GIT_REPO = $GIT_REPO"
print "GIT_DIR = $GIT_DIR"
TEMP_DIR=$(mktemp --dir)
-TAR_FILE=${PWD}/${NAME}-${VERSION}-${GIT_COMMIT}.tar.gz
-CMP_FILE=${PWD}/composer.json
pushd $TEMP_DIR
print "Cloning git repo..."
@@ -53,7 +55,7 @@ pushd $TEMP_DIR
pushd $GIT_DIR
print "Checking out commit..."
$GIT checkout $GIT_COMMIT
- cp composer.json $CMP_FILE
+ cp composer.json ${SPEC_DIR}/composer.json
popd
TAR_DIR=${GIT_NAME}-${GIT_COMMIT}
@@ -61,6 +63,7 @@ pushd $TEMP_DIR
mv $GIT_DIR $TAR_DIR
+ TAR_FILE=${SPEC_DIR}/${NAME}-${VERSION}-${GIT_COMMIT}.tar.gz
print "TAR_FILE = $TAR_FILE"
[ -e $TAR_FILE ] && rm -f $TAR_FILE