You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
12 lines
359 B
12 lines
359 B
#!/bin/sh
|
|
set -e
|
|
|
|
# no built-in tar support, write to a temporary directory first
|
|
tempdir=/tmp/kiekpull.$$
|
|
mkdir -p "$tempdir"
|
|
trap 'rm -r "$tempdir"' EXIT INT TERM
|
|
|
|
# use printf to built a nice lftp cmdline in one go, fetch, and tar!
|
|
server="$1"; shift
|
|
lftp -c "connect $server && lcd $tempdir $(printf " && get %s" "$@")"
|
|
(cd "$tempdir" && tar -cz -- "$@")
|
|
|