-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This function produces, at build time, a file containing the list of files given as argument. It is used when a command uses, as argument, a file containing the list of files to process. One usecase is to provide to `xgettext` the list of files to process, from the list of source files, when this list is too long to be provided to the command line as individual files.
- Loading branch information
Showing
5 changed files
with
140 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
## `fs.configure_file_list()` | ||
|
||
This function produces, at build time, a file containing the list of files given | ||
as argument. It is used when a command uses, as argument, a file containing the | ||
list of files to process. One usecase is to provide to `xgettext` the list of | ||
files to process, from the list of source files, when this list is too long to | ||
be provided to the command line as individual files. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
#!/usr/bin/env python3 | ||
|
||
import sys | ||
from pathlib import Path | ||
|
||
input_file = Path(sys.argv[-1]) | ||
if not input_file.exists(): | ||
sys.exit('Input file not found') | ||
|
||
with input_file.open('r', encoding='utf-8') as f: | ||
for line in f: | ||
line = line.strip() | ||
if not Path(line).exists(): | ||
sys.exit(f'File {line} not found') | ||
|
||
sys.exit(0) |