24 lines
314 B
Awk
24 lines
314 B
Awk
function emit_document() {
|
|
if (document != "" && !is_secret) {
|
|
printf "%s", document
|
|
}
|
|
}
|
|
|
|
$0 == "---" {
|
|
emit_document()
|
|
document = "---\n"
|
|
is_secret = 0
|
|
next
|
|
}
|
|
|
|
{
|
|
document = document $0 "\n"
|
|
if ($0 ~ /^kind:[[:space:]]*Secret[[:space:]]*$/) {
|
|
is_secret = 1
|
|
}
|
|
}
|
|
|
|
END {
|
|
emit_document()
|
|
}
|