summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2017-10-06 07:03:06 +0200
committerRemi Collet <remi@remirepo.net>2017-10-06 07:03:06 +0200
commit658a60f093350cefaedfb593818d4eb49adf17b8 (patch)
tree9f31b85c18c10bb1c3fa22ba574e1d59c86fc5c6
parentd2d91ab79cf5a793ece112842bd99f08fd586126 (diff)
minor
-rwxr-xr-xphp-aws-sdk3-get-source.sh9
1 files changed, 6 insertions, 3 deletions
diff --git a/php-aws-sdk3-get-source.sh b/php-aws-sdk3-get-source.sh
index 4ad1051..3947de4 100755
--- a/php-aws-sdk3-get-source.sh
+++ b/php-aws-sdk3-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