add wildcard for matching

This commit is contained in:
Louis Abel 2023-03-28 22:26:31 -07:00
parent 4ad04a1b39
commit 75861c9efd
Signed by: label
GPG Key ID: B37E62D143879B36

View File

@ -1174,9 +1174,9 @@ class IsoBuild:
for line in i: for line in i:
path = line.lstrip("/").rstrip("\n") path = line.lstrip("/").rstrip("\n")
if path in updatable_files: if path in updatable_files:
updatables.add(path) updatables.add("*/" +path)
else: else:
ignores.add(path) ignores.add("*/" + path)
except Exception as e: except Exception as e:
self.log.error(Color.FAIL + 'File was likely not found.') self.log.error(Color.FAIL + 'File was likely not found.')
raise SystemExit(e) raise SystemExit(e)
@ -1255,6 +1255,11 @@ class IsoBuild:
result[zl] = u[zl] result[zl] = u[zl]
seen.add(dirn) seen.add(dirn)
# Note to self, we need to add a "/" to the list of files
# that we're either updating or ignoring..
# also we need to add the update logic to the classic.
#exclude_list = [os.path.join('/', exc) for exc in exclude]
#update_list = [os.path.join('/', upd) for upd in update]
if self.iso_map['xorrisofs']: if self.iso_map['xorrisofs']:
fx = open(xorrspath, "w") fx = open(xorrspath, "w")
for zm in sorted(result, key=self._sorting): for zm in sorted(result, key=self._sorting):
@ -1271,7 +1276,6 @@ class IsoBuild:
if found: if found:
continue continue
mcmd = "-update" if replace else "-map" 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.write("%s %s %s\n" % (mcmd, u[zm], zm))
fx.close() fx.close()
else: else: