summaryrefslogtreecommitdiffstats
path: root/php-behat-mink-get-source.sh
diff options
context:
space:
mode:
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