21 lines
517 B
Awk
Executable file
21 lines
517 B
Awk
Executable file
#!/usr/bin/env -S awk -f
|
|
BEGIN {
|
|
REPLACE=1
|
|
state=0
|
|
while( (getline < "./tool/blender-xrfragments.py") > 0 ){
|
|
if( $1 ~ /^}/ && state == REPLACE ) state=0
|
|
|
|
print $0
|
|
|
|
if( state == REPLACE ){
|
|
while( (getline < "./xrfragment-engine-prefixes.json") > 0 ){
|
|
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
|
|
}
|
|
}
|