Files
submariner-charts/extract-yamls
T
Stephen KittandThomas Pantelis 4967ab1b72 Add a YAML extraction script
This is intended for use with pkg/embeddedyamls/yamls.go from the
operator.

Signed-off-by: Stephen Kitt <skitt@redhat.com>
2025-01-20 12:25:48 -05:00

19 lines
268 B
Awk
Executable File

#!/usr/bin/awk -f
# Start of a file entry
/= `/ {
outfile = gensub("_yaml$", ".yaml", "1", $1)
print "Writing " outfile
print substr($0, index($0, "`") + 1) > outfile
next
}
/^`$/ {
outfile = ""
next
}
outfile != "" {
print >> outfile
}