add update portion

This commit is contained in:
Louis Abel 2023-03-27 21:05:08 -07:00
parent f33bea6ccb
commit 582905d71e
Signed by untrusted user: label
GPG Key ID: B37E62D143879B36

View File

@ -1259,13 +1259,20 @@ class IsoBuild:
fx = open(xorrspath, "w") fx = open(xorrspath, "w")
for zm in sorted(result, key=self._sorting): for zm in sorted(result, key=self._sorting):
found = False found = False
replace = False
for excl in exclude: for excl in exclude:
if fnmatch(zm, excl): if fnmatch(zm, excl):
found = True found = True
break break
for upda in update:
if fnmatch(zm, upda):
replace = True
break
if found: if found:
continue continue
fx.write("-map %s %s\n" % (u[zm], zm)) mcmd = "-update" if replace else "-map"
#fx.write("-map %s %s\n" % (u[zm], zm))
fx.write("%s %s %s\n" % (mcmd, u[zm], zm))
fx.close() fx.close()
else: else:
fh = open(filepath, "w") fh = open(filepath, "w")