]>
git.scottworley.com Git - picsort/blob - slurp-pics
c8a92f0b2ec695a18895f62d4e4e2dba17373de1
3 LEGACY
='-oHostKeyAlgorithms=+ssh-dss'
4 sftp
=( sftp
-v -P 19362 -i .slurp
-key -oConnectTimeout=4 $LEGACY )
7 while read host path
;do
8 outdir
="slurp-$host-${path//\//,}"
10 mkdir -p "$outdir" "$seendir/$outdir"
12 "${sftp[@]}" "slurp@$host" <<< "cd $path"$'\n'"ls -1" |
14 while read filename;do
15 output_filename="$outdir/${filename/jpg/jpeg}"
16 if [[ -e "$output_filename" || -e "$seendir/$output_filename" ]];then
17 echo "skipping $filename" >&2
19 echo "getting $filename" >&2
20 echo "get -p $filename $output_filename"
23 } | "${sftp[@]}" "slurp@$host"
24 for f in "$outdir"/*;do
27 ./rename-to-date "$outdir"/*