]> git.scottworley.com Git - picsort/commitdiff
Allow fetching multiple dirs per device
authorScott Worley <scottworley@scottworley.com>
Sun, 19 Jul 2020 16:11:05 +0000 (09:11 -0700)
committerScott Worley <scottworley@scottworley.com>
Sun, 19 Jul 2020 16:11:05 +0000 (09:11 -0700)
slurp-pics

index 533c680f56cf1856778d3122277a8ed9f0b59b21..0dd4e78d821917dd0a2408f7f35981b1e77b5abb 100755 (executable)
@@ -3,9 +3,9 @@
 LEGACY='-oHostKeyAlgorithms=+ssh-dss'
 sftp=( sftp -v -P 19362 -i .slurp-key -oConnectTimeout=4 $LEGACY )
 
+seendir="slurp-seen"
 while read host path;do
-  outdir="slurp-$host"
-  seendir="slurp-seen"
+  outdir="slurp-$host-${path//\//,}"
   {
     mkdir -p "$outdir" "$seendir/$outdir"
     echo "cd $path"