When using "ftp" command, set its stdin to /dev/null. Non-interactive

ftp will handle it, interactive ftp will fail rather than stop.
This commit is contained in:
Pavel Roskin 2004-03-01 18:11:16 +00:00
parent b46fe283f6
commit 24b6e7b161
2 changed files with 2 additions and 2 deletions

View File

@ -30,7 +30,7 @@ get_file() {
curl --remote-name "$1" || \
wget --passive-ftp "$1" || \
wget "$1" || \
ftp "$1" || \
ftp "$1" </dev/null || \
exit 1
}

View File

@ -46,7 +46,7 @@ get_file() {
curl --remote-name "$1" || \
wget --passive-ftp "$1" || \
wget "$1" || \
ftp "$1" || \
ftp "$1" </dev/null || \
exit 1
}