aboutsummaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorgerald <gerald@f5534014-38df-0310-8fa8-9805f1628bb7>2004-04-08 20:36:09 +0000
committergerald <gerald@f5534014-38df-0310-8fa8-9805f1628bb7>2004-04-08 20:36:09 +0000
commit8d70ae6bb805e864f78feb6a349b90da955b035d (patch)
tree7120d362702a9fe933639ac0c643ed43819ed04e /tools
parent557c22e722f7d1254f7c1ac5c00c135ac0ee2c2a (diff)
Add a Makefile.nmake target called "setup" that uses the script
tools\win32-setup.sh to - Check for applications required to build Ethereal - Download and unpack required packages into $ETHEREAL_LIBS Update ADNS to the latest version. Make Python 2.3 the default. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@10567 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'tools')
-rw-r--r--tools/win32-setup.sh61
1 files changed, 61 insertions, 0 deletions
diff --git a/tools/win32-setup.sh b/tools/win32-setup.sh
new file mode 100644
index 0000000000..158e622eca
--- /dev/null
+++ b/tools/win32-setup.sh
@@ -0,0 +1,61 @@
+#!/bin/sh
+
+DOWNLOAD_PREFIX="http://www.ethereal.com/distribution/win32/development"
+
+err_exit () {
+ echo "ERROR: $1"
+ echo ""
+ exit 1
+}
+
+usage () {
+ echo "Usage:"
+ echo " $0 --appverify <appname> [<appname>] ..."
+ echo " $0 --download <destination> <subdirectory> <package>"
+ echo ""
+ exit 1
+}
+
+
+case "$1" in
+'--appverify')
+ shift
+ if [ "$*" == "" ] ; then
+ usage
+ fi
+ echo "Checking for required applications:"
+ for APP in $* ; do
+ APP_LOC=`which $APP 2> /dev/null`
+ if [ "$APP_LOC" = "" ] ; then
+ err_exit "Can't find $APP"
+ fi
+ echo " $APP: $APP_LOC $res"
+ done
+ ;;
+'--download')
+ if [ "$2" == "" -o "$3" == "" -o "$4" == "" ] ; then
+ usage
+ fi
+ DEST_PATH=`cygpath --unix "$2"`
+ DEST_SUBDIR=$3
+ PACKAGE_PATH=$4
+ PACKAGE=`basename "$PACKAGE_PATH"`
+ echo "Downloading $4 into $DEST_PATH, installing into $3"
+ if [ ! -d "$DEST_PATH/$DEST_SUBDIR" ] ; then
+ mkdir -p "$DEST_PATH/$DEST_SUBDIR" || \
+ err_exit "Can't create $DEST_PATH/$DEST_SUBDIR"
+ fi
+ cd "$DEST_PATH" || err_exit "Can't find $DEST_PATH"
+ wget -nc "$DOWNLOAD_PREFIX/$PACKAGE_PATH" || \
+ err_exit "Can't download $DOWNLOAD_PREFIX/$PACKAGE_PATH"
+ cd $DEST_SUBDIR
+ echo "Extracting $DEST_PATH/$PACKAGE into $DEST_PATH/$DEST_SUBDIR"
+ unzip -nq "$DEST_PATH/$PACKAGE" ||
+ err_exit "Couldn't unpack $DEST_PATH/$PACKAGE"
+ ;;
+'*')
+ usage
+ ;;
+esac
+
+exit 0