23 lines
463 B
Awk
Executable file
23 lines
463 B
Awk
Executable file
#!/usr/bin/env -S awk -f
|
|
BEGIN {
|
|
REPLACE=1
|
|
state=0
|
|
while( (getline < "./tool/blender-xrfragments.py") > 0 ){
|
|
if( $0 ~ /^}/ && state == REPLACE ){
|
|
print $0
|
|
state=0
|
|
}
|
|
|
|
if( state == REPLACE ){
|
|
gsub("True","true",$0)
|
|
gsub("False","false",$0)
|
|
if( $1 == "\"$version\":" ) $2 = ($2+1)"," # bump version
|
|
if( $0 !~ /^[{}]/ ) print $0
|
|
}
|
|
|
|
if( $1 == "SCHEMA" ){
|
|
state=REPLACE
|
|
print "{"
|
|
}
|
|
}
|
|
}
|