diff options
-rwxr-xr-x | copyPhotos | 27 |
1 files changed, 15 insertions, 12 deletions
@@ -71,17 +71,7 @@ then verwendung fi -for quelle in $( - find /mnt/{android/*/DCIM,usb}/ \ - -name Screenshots -prune , \ - -type f \ - \( \ - -iname "*.jpg" -o \ - -iname "*.rw2" -o \ - -iname "*.mts" \ - \) \ - ) -do +while read -r quelle; do datum="$(date -ud@"$(stat -c'%Y' "${quelle}")" '+%Y_%m_%d')" daten["${quelle}"]="${datum}" jahre["${datum}"]="${datum%%_*}" @@ -96,7 +86,20 @@ do else cp "${quelle}" "${zielVerzeichnis}/${datum}/" fi -done +done \ +< <( + find -files0-from <( + ls -d /mnt/{android/*/DCIM,usb}/ \ + | tr '\n' '\0' + ) \ + -name Screenshots -prune , \ + -type f \ + \( \ + -iname "*.jpg" -o \ + -iname "*.rw2" -o \ + -iname "*.mts" \ + \) \ +) summen="$( for quelle in "${!daten[@]}" |