]> git.scottworley.com Git - picsort/blobdiff - slurp-pics
Find bash with env
[picsort] / slurp-pics
index 533c680f56cf1856778d3122277a8ed9f0b59b21..8bbd7ca9e072c38f8f313220fefdb779b361d802 100755 (executable)
@@ -1,11 +1,11 @@
-#!/bin/bash
+#!/usr/bin/env bash
 
 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"