diff options
author | Gerald Combs <gerald@wireshark.org> | 2018-04-16 11:39:27 -0700 |
---|---|---|
committer | Anders Broman <a.broman58@gmail.com> | 2018-04-17 03:43:38 +0000 |
commit | c8cf127375a1f785fbbcd4d63070a51c306a2c58 (patch) | |
tree | 35c9650e2cb81043931e4e4e8231e9206690ceb5 /tools/git-export-release.sh | |
parent | 5e7cd2dfc6634fcdb005eef5ba3a7c3852b20a9a (diff) |
Add a destination directory flag to git-export-release.
Add a destination directory flag to git-export-release.sh. Use it to
replace the current "dist" target. Use it in the RPM section to avoid a
symlink.
Change-Id: I30ae76b3ab1a995d232e748b79aa37440f90f854
Reviewed-on: https://code.wireshark.org/review/26974
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
Diffstat (limited to 'tools/git-export-release.sh')
-rwxr-xr-x | tools/git-export-release.sh | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/tools/git-export-release.sh b/tools/git-export-release.sh index eb670dbb2b..4abd8bafa9 100755 --- a/tools/git-export-release.sh +++ b/tools/git-export-release.sh @@ -12,7 +12,16 @@ set -e -# First paremeter, if set, is a git commit, like v1.12.0-rc1 or 54819e5699f +DESTDIR=. + +while getopts "d:" OPTCHAR ; do + case $OPTCHAR in + d) DESTDIR=$OPTARG ;; + esac +done +shift $(($OPTIND - 1)) + +# The remaining parameter, if set, is a git commit, like v1.12.0-rc1 or 54819e5699f # By default HEAD is used. # Note, that filtering takes place base on the _exported_ version's # .gitattributes files thus archives generated from older commits will contain @@ -59,7 +68,7 @@ fi echo "Creating wireshark-$VERSION.tar.xz" -git archive --prefix=wireshark-${VERSION}/ ${COMMIT} | xz > wireshark-${VERSION}.tar.xz +git archive --prefix=wireshark-${VERSION}/ ${COMMIT} | xz > ${DESTDIR}/wireshark-${VERSION}.tar.xz if [ "$STASH_POP" == "True" ] ; then git stash pop |