po/make_pot: don't silently omit strings if utilities are missing

Instead abort the script on any errors, which
also helps detecting other unexpected errors.

Adopts parts of: 940181c7bc
  and 4aee271d03
This commit is contained in:
Oneric 2023-04-29 01:23:16 +02:00
parent 87d810254c
commit afa290ecfb
1 changed files with 4 additions and 5 deletions

View File

@ -1,4 +1,5 @@
#!/bin/sh
set -e
maybe_append() {
while read -r msg; do
@ -48,11 +49,9 @@ do
| maybe_append
done
if which xmlstarlet >/dev/null 2>&1 && which jq >/dev/null 2>&1; then
for i in 'name' 'summary' 'p' 'li' 'caption'; do
xmlstarlet sel -t -v "//$i" ../packages/desktop/aegisub.appdata.xml.in.in | jq -R .
done | nl -v0 -w1 -s'|' | sed -re 's/^/aegisub.appdata.xml|/' | maybe_append
fi
for i in 'name' 'summary' 'p' 'li' 'caption'; do
xmlstarlet sel -t -v "//$i" ../packages/desktop/aegisub.appdata.xml.in.in | jq -R .
done | nl -v0 -w1 -s'|' | sed -re 's/^/aegisub.appdata.xml|/' | maybe_append
grep '^_[A-Za-z0-9]*=.*' ../packages/win_installer/fragment_strings.iss.in | while read line
do