diff options
author | gerald <gerald@f5534014-38df-0310-8fa8-9805f1628bb7> | 2008-08-05 17:00:34 +0000 |
---|---|---|
committer | gerald <gerald@f5534014-38df-0310-8fa8-9805f1628bb7> | 2008-08-05 17:00:34 +0000 |
commit | 48a8249eb930e37ff1509e137567dd1122f3dce0 (patch) | |
tree | 209fd2b91577788c1a76e463f8e6ec3721fa4a7c /tools/win32-setup.sh | |
parent | 02457525d725e31f7f253e378d3bff759ad29ecb (diff) |
Add --settag and --checktag arguments to win32-setup.sh, which respectively
save and verify the current download tag. Add --settag and --checktag calls
to the process_libs target. (This should automatically notify everyone when
wireshark-win32-libs is updated, which I tend to forget to do.)
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@25931 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'tools/win32-setup.sh')
-rwxr-xr-x | tools/win32-setup.sh | 34 |
1 files changed, 32 insertions, 2 deletions
diff --git a/tools/win32-setup.sh b/tools/win32-setup.sh index 30a154982d..7891e45ca5 100755 --- a/tools/win32-setup.sh +++ b/tools/win32-setup.sh @@ -7,14 +7,18 @@ # in order to provide backward compatibility with older trees (e.g. a # previous release or an older SVN checkout). # Save previous tag. -DOWNLOAD_PREFIX="http://anonsvn.wireshark.org/wireshark-win32-libs/tags/2008-08-04/packages/" +DOWNLOAD_TAG="2008-08-04" +DOWNLOAD_PREFIX="http://anonsvn.wireshark.org/wireshark-win32-libs/tags/$DOWNLOAD_TAG/packages/" +TAG_FILE="current_tag.txt" # Set DOWNLOAD_PREFIX to /packages to test uploads before creating the tag. #DOWNLOAD_PREFIX="http://anonsvn.wireshark.org/wireshark-win32-libs/trunk/packages/" err_exit () { echo "" - echo "ERROR: $1" + for str in "$@" ; do + echo "ERROR: $str" + done echo "" exit 1 } @@ -24,6 +28,8 @@ 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 "" exit 1 } @@ -109,6 +115,30 @@ case "$1" in fi done ;; +--settag) + if [ -z "$2" ] ; then + usage + fi + DEST_PATH=`cygpath --dos "$2"` + echo "$DOWNLOAD_TAG" > $DEST_PATH/$TAG_FILE + ;; +--checktag) + if [ -z "$2" ] ; then + usage + fi + DEST_PATH=`cygpath --dos "$2"` + WIN_PATH=`cygpath --windows "$2"` + LAST_TAG=`cat $DEST_PATH/$TAG_FILE 2> /dev/null` + if [ "$DOWNLOAD_TAG" != "$LAST_TAG" ] ; then + if [ -z "$LAST_TAG" ] ; then + LAST_TAG="(unknown)" + fi + err_exit \ + "The contents of $WIN_PATH\\$TAG_FILE is $LAST_TAG." \ + "It should be $DOWNLOAD_TAG." \ + "Do you need to run \"nmake -f makefile.nmake setup\"?" + fi + ;; *) usage ;; |