mirror of
https://gitlab.com/fdroid/fdroidserver.git
synced 2024-09-11 15:13:27 +02:00
Support application names in the form of '&app_name;'
This commit is contained in:
parent
a42d00c2a7
commit
bf61dcf708
@ -459,15 +459,22 @@ class vcs_bzr(vcs):
|
|||||||
p.communicate()[0].splitlines()]
|
p.communicate()[0].splitlines()]
|
||||||
|
|
||||||
def retrieve_string(xml_dir, string):
|
def retrieve_string(xml_dir, string):
|
||||||
if not string.startswith('@string/'):
|
if string.startswith('@string/'):
|
||||||
return string.replace("\\'","'")
|
string_search = re.compile(r'.*"'+string[8:]+'".*>([^<]+?)<.*').search
|
||||||
string_search = re.compile(r'.*"'+string[8:]+'".*>([^<]+?)<.*').search
|
for xmlfile in glob.glob(os.path.join(xml_dir, '*.xml')):
|
||||||
for xmlfile in glob.glob(os.path.join(xml_dir, '*.xml')):
|
for line in file(xmlfile):
|
||||||
for line in file(xmlfile):
|
matches = string_search(line)
|
||||||
matches = string_search(line)
|
if matches:
|
||||||
if matches:
|
return retrieve_string(xml_dir, matches.group(1))
|
||||||
return retrieve_string(xml_dir, matches.group(1))
|
elif string.startswith('&') and string.endswith(';'):
|
||||||
return ''
|
string_search = re.compile(r'.*<!ENTITY.*'+string[1:-1]+'.*"([^"]+?)".*>').search
|
||||||
|
for xmlfile in glob.glob(os.path.join(xml_dir, '*.xml')):
|
||||||
|
for line in file(xmlfile):
|
||||||
|
matches = string_search(line)
|
||||||
|
if matches:
|
||||||
|
return retrieve_string(xml_dir, matches.group(1))
|
||||||
|
|
||||||
|
return string.replace("\\'","'")
|
||||||
|
|
||||||
# Return list of existing files that will be used to find the highest vercode
|
# Return list of existing files that will be used to find the highest vercode
|
||||||
def manifest_paths(app_dir, flavour):
|
def manifest_paths(app_dir, flavour):
|
||||||
|
Loading…
Reference in New Issue
Block a user