Commit 10796f5
committed
tplgtool2.py: support filesystem globbing and multiple arguments
Warning: this is a backwards-incompatible change! The previous
behavior is now available ONLY when using `--tplgroot`.
Up to now the user interface made the unusual choice to implement
globbing internally instead of relying on the operating system. Maybe
for compatibility with ancient .BAT scripts? So before this commit,
internal globbing had to be quoted like this to escape the shell
globbing, otherwise it would reject too many arguments:
./tplgtool2.py 'sof-*.tplg' # old, now INVALID usage
This commit adds support for multiple arguments and such quoting is not
necessary anymore. HOWEVER, for backwards-compatibility the old behavior
is preserved when using `--tplgroot`:
./tplgtool2.py --tplgroot . 'sof-*.tplg' # UNCHANGED behavior
See new --help message for more details.
Also add a number of `assert` to fix usability issue #969 and error
handling when relying on the older behavior.
Signed-off-by: Marc Herbert <marc.herbert@intel.com>1 parent 2e1573c commit 10796f5
1 file changed
Lines changed: 18 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1160 | 1160 | | |
1161 | 1161 | | |
1162 | 1162 | | |
1163 | | - | |
| 1163 | + | |
| 1164 | + | |
| 1165 | + | |
1164 | 1166 | | |
1165 | 1167 | | |
1166 | | - | |
1167 | | - | |
| 1168 | + | |
| 1169 | + | |
1168 | 1170 | | |
1169 | 1171 | | |
1170 | 1172 | | |
| |||
1214 | 1216 | | |
1215 | 1217 | | |
1216 | 1218 | | |
1217 | | - | |
1218 | 1219 | | |
1219 | 1220 | | |
1220 | 1221 | | |
| |||
1223 | 1224 | | |
1224 | 1225 | | |
1225 | 1226 | | |
1226 | | - | |
1227 | | - | |
| 1227 | + | |
| 1228 | + | |
| 1229 | + | |
| 1230 | + | |
| 1231 | + | |
| 1232 | + | |
| 1233 | + | |
| 1234 | + | |
| 1235 | + | |
| 1236 | + | |
| 1237 | + | |
| 1238 | + | |
1228 | 1239 | | |
1229 | 1240 | | |
1230 | 1241 | | |
1231 | 1242 | | |
1232 | 1243 | | |
1233 | | - | |
| 1244 | + | |
1234 | 1245 | | |
1235 | 1246 | | |
0 commit comments