Skip to content

Commit

Permalink
Work with various versions of xmllint
Browse files Browse the repository at this point in the history
The xmllint's --shell has a different prompt in different versions,
fix the release_extension script to work with both 20913 (Ubuntu
22.04) and 21003 (openSUSE Leap 15.5).
  • Loading branch information
choroba committed Mar 22, 2024
1 parent 3916e20 commit 4fd11c1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion release_extension
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ else
echo "WARNING: will not validate package.xml (PML validator pml_validate not found in PATH or not working)" >&2
fi

pkgname=$(xmllint --shell "$meta" <<<'cat //*[name()="pkgname"]/text()' | sed -n 3p)
pkgname=$(xmllint --shell "$meta" <<<'cat //*[name()="pkgname"]/text()' | grep -v '^/ >\|-----')
if [[ $pkgname != $name ]] ; then
echo "Invalid package name: $pkgname != $name." >&2
exit 1
Expand Down

0 comments on commit 4fd11c1

Please sign in to comment.