Add comment feature
This commit is contained in:
@@ -28,6 +28,8 @@ def read_sources(source_file: str) -> List[str]:
|
|||||||
with open(source_file, "r") as file:
|
with open(source_file, "r") as file:
|
||||||
for line in file:
|
for line in file:
|
||||||
path = line.strip()
|
path = line.strip()
|
||||||
|
if path.startswith("#"):
|
||||||
|
continue
|
||||||
if (path.endswith("sources.list")):
|
if (path.endswith("sources.list")):
|
||||||
new_path = pathlib.Path(base_dir) / path
|
new_path = pathlib.Path(base_dir) / path
|
||||||
for recursive_path in read_sources(new_path):
|
for recursive_path in read_sources(new_path):
|
||||||
@@ -36,4 +38,4 @@ def read_sources(source_file: str) -> List[str]:
|
|||||||
abs_path = pathlib.Path(base_dir / path).absolute()
|
abs_path = pathlib.Path(base_dir / path).absolute()
|
||||||
files.append(str(abs_path))
|
files.append(str(abs_path))
|
||||||
|
|
||||||
return files
|
return files
|
||||||
|
|||||||
@@ -1,2 +1,3 @@
|
|||||||
src/sub/submodule/sources.list
|
src/sub/submodule/sources.list
|
||||||
src/example.sv
|
src/example.sv
|
||||||
|
# This is a comment!
|
||||||
|
|||||||
Reference in New Issue
Block a user