fontgen: remove advanced (format string, process as list) from patching
This commit is contained in:
parent
f7e8caa04a
commit
b6b322efdd
|
@ -12,7 +12,7 @@
|
|||
],
|
||||
"bpp": 1,
|
||||
"size": 20,
|
||||
"patches": ["{file}_zero.patch"]
|
||||
"patches": ["jetbrains_mono_bold_20.c_zero.patch"]
|
||||
},
|
||||
"jetbrains_mono_42": {
|
||||
"sources": [
|
||||
|
|
|
@ -66,18 +66,7 @@ def main():
|
|||
subprocess.check_call(line)
|
||||
if patches:
|
||||
for patch in patches:
|
||||
try:
|
||||
# Try and patch, if given a string
|
||||
patch = patch.format(name=name, file=name+'.c')
|
||||
subprocess.check_call(['/usr/bin/patch', name+'.c', patch])
|
||||
continue
|
||||
except: pass
|
||||
try:
|
||||
# otherwise, assume a "advanced" patch, which is a list of strings.
|
||||
patch = [arg.format(name=name, file=name+'.c') for arg in patch]
|
||||
subprocess.check_call(patch)
|
||||
except Exception as e:
|
||||
sys.exit('Failed to patch using "{patch}"\n{err}'.format(patch=patch,err=e))
|
||||
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user