3 # DOWNLOAD_PREFIX="http://www.ethereal.com/distribution/win32/development"
4 DOWNLOAD_PREFIX="http://anonsvn.ethereal.com/ethereal-win32-libs/tags/2004-11-23/packages"
14 echo " $0 --appverify <appname> [<appname>] ..."
15 echo " $0 --download <destination> <subdirectory> <package>"
27 echo "Checking for required applications:"
29 APP_PATH=`cygpath --unix $APP`
30 if [ -x "$APP_PATH" -a ! -d "$APP_PATH" ] ; then
33 APP_LOC=`which $APP_PATH 2> /dev/null`
35 if [ "$APP_LOC" = "" ] ; then
36 err_exit "Can't find $APP"
38 echo " $APP: $APP_LOC $res"
42 if [ -z "$2" -o -z "$3" -o -z "$4" ] ; then
45 DEST_PATH=`cygpath --unix "$2"`
48 PACKAGE=`basename "$PACKAGE_PATH"`
49 echo "****** $PACKAGE ******"
50 if [ -z "$http_proxy" -a -z "$HTTP_PROXY" ] ; then
51 echo "No HTTP proxy specified (http_proxy and HTTP_PROXY are empty)."
55 if [ -z "$http_proxy" ] ; then
56 echo "HTTP proxy ($HTTP_PROXY) has been specified and will be used."
58 echo "HTTP proxy ($http_proxy) has been specified and will be used."
61 echo "Downloading $4 into $DEST_PATH, installing into $3"
62 if [ ! -d "$DEST_PATH/$DEST_SUBDIR" ] ; then
63 mkdir -p "$DEST_PATH/$DEST_SUBDIR" || \
64 err_exit "Can't create $DEST_PATH/$DEST_SUBDIR"
66 cd "$DEST_PATH" || err_exit "Can't find $DEST_PATH"
67 wget $use_proxy -nc "$DOWNLOAD_PREFIX/$PACKAGE_PATH" || \
68 err_exit "Can't download $DOWNLOAD_PREFIX/$PACKAGE_PATH"
69 cd "$DEST_SUBDIR" || err_exit "Can't find $DEST_SUBDIR"
70 echo "Extracting $DEST_PATH/$PACKAGE into $DEST_PATH/$DEST_SUBDIR"
71 unzip -nq "$DEST_PATH/$PACKAGE" ||
72 err_exit "Couldn't unpack $DEST_PATH/$PACKAGE"
73 echo "Verifying that the DLLs in $DEST_PATH/$DEST_SUBDIR are executable."
74 for i in `/usr/bin/find $DEST_PATH/$DEST_SUBDIR -name \*\.dll` ; do
75 if [ ! -x "$i" ] ; then
76 echo "Changing file permissions (add executable bit) to:"