aboutsummaryrefslogtreecommitdiffstats
path: root/tools/git-export-release.sh
diff options
context:
space:
mode:
authorGerald Combs <gerald@wireshark.org>2018-06-06 10:10:07 -0700
committerGerald Combs <gerald@wireshark.org>2018-06-07 18:11:12 +0000
commit4905983845dd64fc37c7bbaaa0e1f2dcc32f21f4 (patch)
tree04a725c2972c2b16afdd74cd07d5dc6abf00079b /tools/git-export-release.sh
parent0882e94cff6a6a5087bfaf3883c9842cb8f9d944 (diff)
More shellcheck checks and fixes.
Remove a libtool check while we're here. Change-Id: I813add2031480f34ce89f268b541f8939016c2c7 Reviewed-on: https://code.wireshark.org/review/28066 Reviewed-by: Gerald Combs <gerald@wireshark.org>
Diffstat (limited to 'tools/git-export-release.sh')
-rwxr-xr-xtools/git-export-release.sh7
1 files changed, 4 insertions, 3 deletions
diff --git a/tools/git-export-release.sh b/tools/git-export-release.sh
index 884b8607cc..168b87eda3 100755
--- a/tools/git-export-release.sh
+++ b/tools/git-export-release.sh
@@ -17,9 +17,10 @@ DESTDIR=.
while getopts "d:" OPTCHAR ; do
case $OPTCHAR in
d) DESTDIR=$OPTARG ;;
+ *) printf "Unknown option %s" "$OPTCHAR"
esac
done
-shift $(($OPTIND - 1))
+shift $(( OPTIND - 1 ))
# The remaining parameter, if set, is a git commit, like v1.12.0-rc1 or 54819e5699f
# By default HEAD is used.
@@ -37,7 +38,7 @@ if [ ! -e "${GIT_DIR:-.git}" ] ; then
fi
# --abbrev=<n> and --match should match make-version.pl.
-DESCRIPTION=$(git describe --abbrev=8 --match "v[1-9]*" ${COMMIT})
+DESCRIPTION=$(git describe --abbrev=8 --match "v[1-9]*" "${COMMIT}")
VERSION=${DESCRIPTION#v}
STASH_POP=False
@@ -74,7 +75,7 @@ fi
echo "Creating wireshark-$VERSION.tar.xz"
-git archive --prefix=wireshark-${VERSION}/ ${COMMIT} | xz > ${DESTDIR}/wireshark-${VERSION}.tar.xz
+git archive --prefix="wireshark-${VERSION}/" ${COMMIT} | xz > "${DESTDIR}/wireshark-${VERSION}.tar.xz"
if [ "$STASH_POP" == "True" ] ; then
git stash pop