]>
git.scottworley.com Git - picsort/blob - slurp-pics
3 LEGACY
='-oHostKeyAlgorithms=+ssh-dss'
4 sftp
=( sftp
-v -P 19362 -i .slurp
-key -oConnectTimeout=4 $LEGACY )
6 while read host path
;do
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"/*