videsc: Avoid need for zsh/mapfile

This commit is contained in:
Danielle McLean 2024-03-06 13:21:31 +11:00
parent 17c95ee9af
commit c3531b1bdc
Signed by: 00dani
GPG key ID: 52C059C3B22A753E

View file

@ -1,5 +1,4 @@
#!/usr/bin/env zsh
zmodload zsh/mapfile
PREVIEW_TENTHS=7
IMG=$1
@ -27,9 +26,9 @@ videsc() {
${EDITOR:-vim} $DESC_FILE || return $?
pbcopy < $DESC_FILE
if [[ $DESC_FILE -nt $DESC_FILE.stamp ]]; then
pbcopy < $DESC_FILE
exiftool -P -Description="$mapfile[$DESC_FILE]" $IMG
exiftool -P "-Description<=$DESC_FILE" $IMG
else
echo 'no changes detected, not writing updated description.' >&2
fi