libnetwork.lib: make search case insensitive
Signed-off-by: Davide Madrisan <davide.madrisan@gmail.com>
This commit is contained in:
parent
a01ecd4950
commit
2461f2ef9b
@ -23,6 +23,9 @@ Changes in version 1.9.4 -
|
|||||||
* i18n - Davide Madrisan:
|
* i18n - Davide Madrisan:
|
||||||
Updated.
|
Updated.
|
||||||
|
|
||||||
|
* lib/libnetwork.lib - Davide Madrisan:
|
||||||
|
repository.get_pckname_from_HTML: make package search case insensitive.
|
||||||
|
|
||||||
--------------------------------------------------------------------------------
|
--------------------------------------------------------------------------------
|
||||||
|
|
||||||
Changes in version 1.9.3 - April Fools' Day Release
|
Changes in version 1.9.3 - April Fools' Day Release
|
||||||
|
@ -34,7 +34,7 @@ function repository.is_reachable() {
|
|||||||
# function repository.get_srpm_pckname_from_HTML()
|
# function repository.get_srpm_pckname_from_HTML()
|
||||||
# ... ADDME ...
|
# ... ADDME ...
|
||||||
function repository.get_srpm_pckname_from_HTML() {
|
function repository.get_srpm_pckname_from_HTML() {
|
||||||
local pck_name="$1"
|
local pck_name="$(echo "$1" | tr A-Z a-z)"
|
||||||
local infile="$2"
|
local infile="$2"
|
||||||
|
|
||||||
[ "$pck_name" ] || notify.error $"\
|
[ "$pck_name" ] || notify.error $"\
|
||||||
@ -53,12 +53,11 @@ function repository.get_srpm_pckname_from_HTML() {
|
|||||||
regexpr="^$pck_name-[^-]\+-[^-]\+$" || regexpr="$pck_name"
|
regexpr="^$pck_name-[^-]\+-[^-]\+$" || regexpr="$pck_name"
|
||||||
notify.debug "$FUNCNAME: regexpr = \"$regexpr\""
|
notify.debug "$FUNCNAME: regexpr = \"$regexpr\""
|
||||||
|
|
||||||
local pckname_from_HTML=( $(sed -n "\
|
local pckname_from_HTML=($(tr A-Z a-z < $infile | \
|
||||||
# remove HTML tags --> get a better input
|
sed -n "# remove HTML tags --> get a better input
|
||||||
/<[aA] [hH][rR][eE][fF]=\".*\.src\.rpm\"/{
|
/<[aA] [hH][rR][eE][fF]=\".*\.src\.rpm\"/{
|
||||||
s|.*<[aA] [hH][rR][eE][fF]=\"\([^\"]*\)\".*|\1|
|
s|.*<[aA] [hH][rR][eE][fF]=\"\([^\"]*\)\".*|\1|
|
||||||
{/$regexpr/p}
|
{/$regexpr/p}}"))
|
||||||
}" $infile) )
|
|
||||||
echo "${pckname_from_HTML[*]}"
|
echo "${pckname_from_HTML[*]}"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user