diff options
author | Erich Eckner <git@eckner.net> | 2023-01-22 12:40:47 +0100 |
---|---|---|
committer | Erich Eckner <git@eckner.net> | 2023-01-22 12:40:47 +0100 |
commit | 5d6509ee238c89b0385fe7089bca2379db713d3a (patch) | |
tree | 26ebebd1238a0058deba4b35e4808f1790371727 | |
parent | 95165d1c7490f3331fed404d656c00156cdbccc3 (diff) | |
download | copyPhotos-5d6509ee238c89b0385fe7089bca2379db713d3a.tar.xz |
copyPhotos: allow spaces in names
-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[@]}" |