add update portion

This commit is contained in:
Louis Abel 2023-03-27 21:05:08 -07:00
parent f33bea6ccb
commit 582905d71e
Signed by: label
GPG Key ID: B37E62D143879B36
1 changed files with 8 additions and 1 deletions

View File

@ -1259,13 +1259,20 @@ class IsoBuild:
fx = open(xorrspath, "w")
for zm in sorted(result, key=self._sorting):
found = False
replace = False
for excl in exclude:
if fnmatch(zm, excl):
found = True
break
for upda in update:
if fnmatch(zm, upda):
replace = True
break
if found:
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()
else:
fh = open(filepath, "w")