Пустые dafault оставляем как <default/>

master
Artem Proskurnev 3 years ago
parent 8af535e313
commit f84bb554f4
  1. 7
      kometa-std-desktop-1.3/previewplugins.filetrigger

@ -22,9 +22,12 @@ then
gend=$(cat $f | grep -n "</group>" | egrep -o "^[0-9]+")
awk "NR>=$gstart && NR<=$gend" $f > $g
awk "NR<$gstart" $f > $t
xmlstarlet edit -u "/group/entry[@name='previewPlugins']/default" -v "audiothumbnail,ffmpegthumbs,imagethumbnail,exrthumbnail,jpegthumbnail,windowsimagethumbnail,svgthumbnail,windowsexethumbnail,comicbookthumbnail,directorythumbnail,fontthumbnail,blenderthumbnail,rawthumbnail,ebookthumbnail" $g | awk "NR>1" >> $t
xmlstarlet edit -u "/group/entry[@name='previewPlugins']/default" \
-v "audiothumbnail,ffmpegthumbs,imagethumbnail,exrthumbnail,jpegthumbnail,\
windowsimagethumbnail,svgthumbnail,windowsexethumbnail,comicbookthumbnail,\
directorythumbnail,fontthumbnail,blenderthumbnail,rawthumbnail,ebookthumbnail" \
$g | awk "NR>1" >> $t
awk "NR>$gend" $f >> $t
sed -i "s/<default\/>/<default><\/default>/g" $t
mv -f $t $mf
fi
fi

Loading…
Cancel
Save