/usr/bin/lftpget is in lftp 4.4.13-1ubuntu0.1.
This file is owned by root:root, with mode 0o755.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 | #!/bin/sh
# lftpget - get a file with lftp
# Copyright (c) 1999-2000 Alexander V. Lukyanov <lav@yars.free.net>
# This file is covered by GNU GPL. See file COPYING for details.
if [ $# -eq 0 ]; then
echo "Usage: $0 [-c] [-d] [-v] URL [URL...]"
echo " -c continue, reget"
echo " -d debug output"
echo " -v verbose messages"
exit 1
fi
INTRO="set cmd:at-exit;set xfer:max-redirections 16;"
SCRIPT=""
verbose=false
while :
do
case "$1" in
-*v*) verbose=true
INTRO="$INTRO set cmd:verbose y;"
;;
esac
case "$1" in
-*d*) INTRO="$INTRO debug 8;";;
esac
case "$1" in
-*c*) CONT=-c;;
-*[dv]*) ;;
*) break;;
esac
shift
done
for f
do
need_pass=false
case "$f" in
"*[\"'\\]*")
# need to quote
f="`echo "$f" | sed 's/\([\\\"'\'']\)/\\\1/g'`"
;;
esac
case "$f" in
"*://*:*@*") ;;
"*://*@*") need_pass=true;;
esac
if $verbose; then
SCRIPT="$SCRIPT echo Retrieving \`\"$f\"\'...;"
fi
if $need_pass; then
SCRIPT="$SCRIPT echo \"$f\" needs password;"
fi
SCRIPT="$SCRIPT get1 $CONT \"$f\";"
if $verbose; then
SCRIPT="$SCRIPT && echo Got \`\"$f\"\'.;"
fi
done
if [ "$SCRIPT" = "" ]; then
echo "Usage: $0 URL [URL...]" >&2
exit 1
fi
exec lftp -c "$INTRO $SCRIPT"
|