2
# This Source Code Form is subject to the terms of the Mozilla Public
3
# License, v. 2.0. If a copy of the MPL was not distributed with this
4
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
6
# Get the target platform from a set of install.rdf files, and
7
# return the first install.rdf with the platform replaced by the list of
8
# platforms as parsed from all the files
9
# Allows to create a install.rdf for multiple platforms
12
from xml.dom.minidom import parse
15
for arg in sys.argv[2:]:
16
doc = parse(arg + "/install.rdf")
17
elem = doc.getElementsByTagName("em:targetPlatform")[0]
18
elems.append(elem.cloneNode(True))
20
doc = parse(sys.argv[1] + "/install.rdf")
21
elem = doc.getElementsByTagName("em:targetPlatform")[0]
23
elem.parentNode.insertBefore(newelem, elem)