Quit if no keywords found.
This commit is contained in:
@@ -53,13 +53,17 @@ exif=$(exiftool -Canon -s -Keywords "$file")
|
||||
# error occurred, or 2 if all files failed the -if condition (for any of
|
||||
# the commands if -execute was used).
|
||||
|
||||
#echo "$exif"
|
||||
# Keywords : Anemone pulsatilla, Anemone pulsatille, _bleu_
|
||||
|
||||
# keywords
|
||||
k=$(echo "$exif" | sed -n '/^Keywords/p' | awk -F":" '{print $2}' | sed 's/^ *//g')
|
||||
# _vert_, accouplement, brocard, capreolus capreolus, chevrette, chevreuil, rut
|
||||
echo "$k"
|
||||
|
||||
if [ -z "$k" ]; then
|
||||
echo -e "${bold}${red}No Keywords found !${reset}"
|
||||
echo "Quit."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Anemone pulsatilla, Anemone pulsatille, _bleu_
|
||||
|
||||
IFS="," read -a key <<< "$k"
|
||||
@@ -75,8 +79,6 @@ do
|
||||
fi
|
||||
|
||||
k_fr=$(echo "$ii")
|
||||
echo "k_fr: $k_fr long: "${#k_fr}
|
||||
echo "k_en: $k_en long: "${#k_en}
|
||||
|
||||
if [ -n "$k_en" ]; then
|
||||
echo "fr & en"
|
||||
|
||||
Reference in New Issue
Block a user