summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
36c88e5)
Do an already-exists check instead of just using rsync because some
impoverished hosts like Android phones that don't have rsync.
I'm using this with
https://play.google.com/store/apps/details?id=com.icecoldapps.sshserver
+\.slurp-hosts
+\.slurp-key
+\.slurp-key\.pub
--- /dev/null
+#!/bin/bash
+
+while read host path;do
+ {
+ echo "cd $path"
+ sftp -v -P 19362 -i .slurp-key "slurp@$host" <<< "cd $path"$'\n'"ls -1" |
+ sed 1,2d |
+ while read filename;do
+ if [[ -e "$filename" ]];then
+ echo "skipping $filename" >&2
+ else
+ echo "getting $filename" >&2
+ echo "get -p $filename ${filename/jpg/jpeg}"
+ fi
+ done
+ } | sftp -v -P 19362 -i .slurp-key "slurp@$host"
+done < .slurp-hosts