Fix regular expression to extract package handle

pull/126/head
Michele Locati 2020-02-25 14:03:34 +01:00
parent 419d019232
commit 37e0b4fff3
No known key found for this signature in database
GPG Key ID: 98B7CE2E7234E28B
1 changed files with 1 additions and 1 deletions

View File

@ -25,7 +25,7 @@ for XML_LINE in $XML; do
case "$XML_LINE" in
\<item\ *)
URL="$(printf '%s' "$XML_LINE" | sed -r 's#^.+ rdf:about\s*=\s*"##' | sed -r 's#".*$##')"
EXTENSION="$(printf '%s' "$URL" | sed -r 's#^.*[?%]package=##' | sed -r 's#&.*$##')"
EXTENSION="$(printf '%s' "$URL" | sed -r 's#^.*[?&]package=##' | sed -r 's#&.*$##')"
if test -n "$EXTENSION" && ! stringInList "$EXTENSION" "$EXTENSIONS"; then
EXTENSIONS="$EXTENSIONS $EXTENSION"
NUM_EXTENSIONS=$((NUM_EXTENSIONS + 1))