summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorJoerg Mayer <jmayer@loplof.de>2014-07-21 02:21:49 +0200
committerJörg Mayer <jmayer@loplof.de>2014-07-21 00:22:26 +0000
commitc90b642fef12efa5ef61e0526c8661830a9d0e0b (patch)
tree600593b7c8650637ed2f28e5862d1a35632b45ad /tools
parent622f06b2c2b2c7180420c177a368543922a0b87c (diff)
downloadwireshark-c90b642fef12efa5ef61e0526c8661830a9d0e0b.tar.gz
Pass the download tag as an argument to win-setup.sh instead as an enviroment variable
Change-Id: Id2369cec93b82f182bab9046469796f51115accb Reviewed-on: https://code.wireshark.org/review/3143 Reviewed-by: Jörg Mayer <jmayer@loplof.de>
Diffstat (limited to 'tools')
-rwxr-xr-xtools/win-setup.sh25
-rwxr-xr-xtools/win32-setup.sh13
-rwxr-xr-xtools/win64-setup.sh13
3 files changed, 35 insertions, 16 deletions
diff --git a/tools/win-setup.sh b/tools/win-setup.sh
index 9ab6e8b4c1..ca7f33847d 100755
--- a/tools/win-setup.sh
+++ b/tools/win-setup.sh
@@ -41,9 +41,9 @@ usage () {
echo "Usage:"
echo " $0 --appverify <appname> [<appname>] ..."
echo " $0 --libverify <destination> <subdirectory> <package>"
- echo " $0 --download <destination> <subdirectory> <package>"
- echo " $0 --settag <destination>"
- echo " $0 --checktag <destination>"
+ echo " $0 --download <destination> <subdirectory> <package> <tag>"
+ echo " $0 --settag <destination> <tag>"
+ echo " $0 --checktag <destination> <tag>"
echo ""
exit 1
}
@@ -93,15 +93,13 @@ find_proxy() {
}
# Main
-if [ -z "$DOWNLOAD_TAG" ]; then
- err_exit "DOWNLOAD_TAG not defined"
-fi
TAG_FILE="current_tag.txt"
-
+if [ -z "$*" ] ; then
+ usage
+fi
case "$1" in
--appverify)
shift
-
if [ -z "$*" ] ; then
usage
fi
@@ -161,13 +159,13 @@ case "$1" in
fi
;;
--download)
- if [ -z "$2" -o -z "$3" -o -z "$4" ] ; then
+ if [ -z "$2" -o -z "$3" -o -z "$4" -o -z "$5" ] ; then
usage
fi
DEST_PATH=$(cygpath "$2")
DEST_SUBDIR=$3
PACKAGE_PATH=$4
- PACKAGE=$(basename "$PACKAGE_PATH")
+ DOWNLOAD_TAG=$5
if [ -z "$WIRESHARK_TARGET_PLATFORM" ]; then
err_exit "WIRESHARK_TARGET_PLATFORM not defined"
@@ -181,6 +179,7 @@ case "$1" in
#DOWNLOAD_PREFIX="http://anonsvn.wireshark.org/wireshark-$WIRESHARK_TARGET_PLATFORM-libs/trunk/packages"
DOWNLOAD_PREFIX="http://anonsvn.wireshark.org/wireshark-$WIRESHARK_TARGET_PLATFORM-libs/tags/$DOWNLOAD_TAG/packages"
+ PACKAGE=$(basename "$PACKAGE_PATH")
echo ""
echo "****** $PACKAGE ******"
find_proxy
@@ -212,18 +211,20 @@ case "$1" in
fi
;;
--settag)
- if [ -z "$2" ] ; then
+ if [ -z "$2" -o -z "$3" ] ; then
usage
fi
DEST_PATH=$(cygpath "$2")
+ DOWNLOAD_TAG=$3
echo "$DOWNLOAD_TAG" > "$DEST_PATH/$TAG_FILE"
;;
--checktag)
- if [ -z "$2" ] ; then
+ if [ -z "$2" -o -z "$3" ] ; then
usage
fi
DEST_PATH=$(cygpath "$2")
WIN_PATH=$(cygpath --windows "$2")
+ DOWNLOAD_TAG=$3
LAST_TAG=$(cat "$DEST_PATH/$TAG_FILE" 2> /dev/null)
if [ "$DOWNLOAD_TAG" != "$LAST_TAG" ] ; then
if [ -z "$LAST_TAG" ] ; then
diff --git a/tools/win32-setup.sh b/tools/win32-setup.sh
index 1b316ff509..d056537fd6 100755
--- a/tools/win32-setup.sh
+++ b/tools/win32-setup.sh
@@ -23,8 +23,17 @@
# 32-bit wrapper for win-setup.sh.
export DOWNLOAD_TAG="2014-06-05"
-export WIRESHARK_TARGET_PLATFORM="win32"
WIN_SETUP=`echo $0 | sed -e s/win32/win/`
-exec $WIN_SETUP $@
+if [ -z "$*" ]; then
+ exec $WIN_SETUP $@
+fi
+case "$1" in
+--download|--settag|--checktag)
+ exec $WIN_SETUP $@ $DOWNLOAD_TAG
+ ;;
+*)
+ exec $WIN_SETUP $@
+ ;;
+esac
diff --git a/tools/win64-setup.sh b/tools/win64-setup.sh
index 0918b2bebd..009c77b763 100755
--- a/tools/win64-setup.sh
+++ b/tools/win64-setup.sh
@@ -23,8 +23,17 @@
# 64-bit wrapper for win-setup.sh.
export DOWNLOAD_TAG="2014-06-05"
-export WIRESHARK_TARGET_PLATFORM="win64"
WIN_SETUP=`echo $0 | sed -e s/win64/win/`
-exec $WIN_SETUP $@
+if [ -z "$*" ]; then
+ exec $WIN_SETUP $@
+fi
+case "$1" in
+--download|--settag|--checktag)
+ exec $WIN_SETUP $@ $DOWNLOAD_TAG
+ ;;
+*)
+ exec $WIN_SETUP $@
+ ;;
+esac