Merge pull request #10452 from GabyCT/topic/katadoctemp

tests: Add trap statement in kata doc script
This commit is contained in:
GabyCT 2024-10-24 13:21:11 -06:00 committed by GitHub
commit a9af46ccd2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -168,6 +168,7 @@ doc_to_script()
all=$(mktemp)
body=$(mktemp)
trap 'rm -f $body $all' EXIT
cat "$file" |\
sed -n "/^ *${bash_block_open}/,/^ *${block_close}/ p" |\
@ -188,9 +189,6 @@ doc_to_script()
# create output file
[ "$check_only" = "no" ] && cp "$all" "$outfile"
# clean up
rm -f "$body" "$all"
}
main()