fix: Tolerate missing ESD catalog matches (#1811)

This commit is contained in:
Kroese
2026-07-07 01:07:30 +02:00
committed by GitHub
parent 6d79a7c9ab
commit 9c4ac26372
+3 -4
View File
@@ -559,14 +559,13 @@ getESD() {
error "Failed to find $xFile in $file!" && return 1 error "Failed to find $xFile in $file!" && return 1
fi fi
local edQuery='//File[Architecture="'${PLATFORM,,}'"]'"${edition}"'' result=$(xmllint --nonet --xpath "${edQuery}" "$dir/$xFile" 2>/dev/null || true)
result=$(xmllint --nonet --xpath "${edQuery}" "$dir/$xFile" 2>/dev/null)
if [ -z "$result" ]; then if [ -z "$result" ]; then
edQuery='//File[Architecture="'${PLATFORM^^}'"]'"${edition}"'' edQuery='//File[Architecture="'${PLATFORM^^}'"]'"${edition}"''
result=$(xmllint --nonet --xpath "${edQuery}" "$dir/$xFile" 2>/dev/null) result=$(xmllint --nonet --xpath "${edQuery}" "$dir/$xFile" 2>/dev/null || true)
if [ -z "$result" ]; then if [ -z "$result" ]; then
desc=$(printEdition "$version" "$desc") desc=$(printEdition "$version" "$desc")
@@ -580,7 +579,7 @@ getESD() {
echo "$result" >> "$dir/$fFile" echo "$result" >> "$dir/$fFile"
echo -e '</Catalog>'>> "$dir/$fFile" echo -e '</Catalog>'>> "$dir/$fFile"
result=$(xmllint --nonet --xpath "//File[LanguageCode=\"${culture,,}\"]" "$dir/$fFile" 2>/dev/null) result=$(xmllint --nonet --xpath "//File[LanguageCode=\"${culture,,}\"]" "$dir/$fFile" 2>/dev/null || true)
if [ -z "$result" ]; then if [ -z "$result" ]; then
desc=$(printEdition "$version" "$desc") desc=$(printEdition "$version" "$desc")