~carloabelli/bin

5586740a12978b0a0e85e8c2490e206d2689b3dd — Carlo Abelli 3 years ago 3d78c8f
Cap line lengths at 80 chars
2 files changed, 7 insertions(+), 3 deletions(-)

M backup
M import-photos
M backup => backup +3 -1
@@ 7,7 7,9 @@ fi

dir="$1"

comm -23 <(pacman -Qqe | sort) <((echo base; pacman -Qqg base-devel) | sort) > "$dir/packages.txt"
comm -23 <(pacman -Qqe | sort) \
    <((echo base; pacman -Qqg base-devel) | sort) \
    > "$dir/packages.txt"
rsync -ar \
    --delete-excluded \
    --files-from="$HOME/.config/backup/config" \

M import-photos => import-photos +4 -2
@@ 16,8 16,10 @@ for file in $(find "$mnt/DCIM" -type f | sort -r); do
    name="$(basename "$file" | sed -r "s/([^.]*)\$/\L\1/")"
    echo -n "Importing $name..."
    date="$(exiftool -DateTime -S "$file" | cut -d ' ' -f 2 | tr : /)"
    [ -z "$date" ] && date="$(exiftool -DateTimeOriginal -S "$file" | cut -d ' ' -f 2 | tr : /)"
    [ -z "$date" ] && date="$(exiftool -CreateDate -S "$file" | cut -d ' ' -f 2 | tr : /)"
    [ -z "$date" ] && date="$(exiftool -DateTimeOriginal -S "$file" | \
        cut -d ' ' -f 2 | tr : /)"
    [ -z "$date" ] && date="$(exiftool -CreateDate -S "$file" | \
        cut -d ' ' -f 2 | tr : /)"
    if [ -z "$date" ]; then
        echo -n "falling back to file modification date!..."
        date="$(stat -c %y "$file" | cut -d ' ' -f 1 | tr - /)"