3 # This MUST be in the form
4 # http://anonsvn.wireshark.org/wireshark-win32-libs/tags/<date>/packages
5 # in order to provide backward compatibility with older trees (e.g. a
6 # previous release or an older SVN checkout).
7 DOWNLOAD_PREFIX="http://anonsvn.wireshark.org/wireshark-win32-libs/tags/2007-03-22/packages"
9 # Set DOWNLOAD_PREFIX to /packages to test uploads before creating the tag.
10 #DOWNLOAD_PREFIX="http://anonsvn.wireshark.org/wireshark-win32-libs/trunk/packages/"
21 echo " $0 --appverify <appname> [<appname>] ..."
22 echo " $0 --download <destination> <subdirectory> <package>"
34 echo "Checking for required applications:"
35 which which > /dev/null 2>&1 || \
36 err_exit "Can't find 'which'. Unable to proceed."
38 APP_PATH=`cygpath --unix $APP`
39 if [ -x "$APP_PATH" -a ! -d "$APP_PATH" ] ; then
42 APP_LOC=`which $APP_PATH 2> /dev/null`
44 if [ "$APP_LOC" = "" ] ; then
45 err_exit "Can't find $APP. This is probably an optional cygwin package not yet installed. Try to install it using cygwin's setup.exe!"
47 echo " $APP: $APP_LOC $res"
51 if [ -z "$2" -o -z "$3" -o -z "$4" ] ; then
54 DEST_PATH=`cygpath --dos "$2"`
57 PACKAGE=`basename "$PACKAGE_PATH"`
58 echo "****** $PACKAGE ******"
59 if [ -z "$http_proxy" -a -z "$HTTP_PROXY" ] ; then
60 echo "No HTTP proxy specified (http_proxy and HTTP_PROXY are empty)."
61 # a proxy might also be specified using .wgetrc, so don't switch off the proxy
65 if [ -z "$http_proxy" ] ; then
66 echo "HTTP proxy ($HTTP_PROXY) has been specified and will be used."
68 echo "HTTP proxy ($http_proxy) has been specified and will be used."
71 echo "Downloading $4 into $DEST_PATH, installing into $3"
72 if [ ! -d "$DEST_PATH/$DEST_SUBDIR" ] ; then
73 mkdir -p "$DEST_PATH/$DEST_SUBDIR" || \
74 err_exit "Can't create $DEST_PATH/$DEST_SUBDIR"
76 cd "$DEST_PATH" || err_exit "Can't find $DEST_PATH"
77 wget $use_proxy -nc "$DOWNLOAD_PREFIX/$PACKAGE_PATH" || \
78 err_exit "Can't download $DOWNLOAD_PREFIX/$PACKAGE_PATH"
79 cd "$DEST_SUBDIR" || err_exit "Can't find $DEST_SUBDIR"
80 echo "Extracting $DEST_PATH/$PACKAGE into $DEST_PATH/$DEST_SUBDIR"
81 unzip -oq "$DEST_PATH/$PACKAGE" ||
82 err_exit "Couldn't unpack $DEST_PATH/$PACKAGE"
83 echo "Verifying that the DLLs in $DEST_PATH/$DEST_SUBDIR are executable."
84 for i in `/usr/bin/find $DEST_PATH/$DEST_SUBDIR -name \*\.dll` ; do
85 if [ ! -x "$i" ] ; then
86 echo "Changing file permissions (add executable bit) to:"