#!/bin/sh # # ftpget # # wrapper to replace original ftpget with any ftp program. # # usage: ftpget filename host path A,I user pass # # kjl/29mar2002 # # Changes in wu-ftpd 2.6.x described in # http://www.wu-ftpd.org/wu-ftpd-faq.html#QA86 # http://www.wu-ftpd.org/broken-clients.html # broke the old ftpget (src/common/url/ftpget.c). # # To use this to gather from FTP sites running wu-ftpd, rename the # original ftpget to ftpget-old and copy this file to replace it. # It uses curl (http://curl.haxx.se/) to get files. if [ -z $1 ]; then echo usage: ftpget filename host path A,I user pass exit 1 fi # uncomment to use old ftpget. # #ftpget-old $* # uncomment to use curl. # # this is for debugging. #echo curl --output $1 --silent --show-error --user $5:$6 ftp://$2/$3 >> /tmp/ftpget-log curl --output $1 --silent --show-error --user $5:$6 ftp://$2//$3