read -r length width height tags comment fn <<-EOF
$(meta_info "$file")
EOF
- tags="$(UNSTRING "${tags#tags=}" |tr , '\n')"
if [ ! "$deltags" ]; then
+ extags="$(printf '%s' "$newtags" |tr , '\n' |grep -e "^-" |cut -d: -f1 )"
+ tags="$(UNSTRING "${tags#tags=}" |tr , '\n' |grep -vwFe "$extags")"
+ if printf %s "$extags" |grep -vq :; then
+ tags="$(printf %s\\n "$tags" |grep -vE '^-[^:]+$')"
+ fi
tags="$(printf '%s\n' "${tags},${newtags}" \
| tr , '\n' |sort -u |tr '\n' , \
| STRING)"
else
+ tags="$(UNSTRING "${tags#tags=}" |tr , '\n')"
detag="${deltags},"; while [ "$detag" ]; do
tags="$(printf '%s\n' "$tags" |grep -vxFe "${detag%%,*}")"
detag="${detag#*,}"