mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-06-23 14:08:31 +00:00
Merge pull request #10452 from GabyCT/topic/katadoctemp
tests: Add trap statement in kata doc script
This commit is contained in:
commit
a9af46ccd2
@ -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()
|
||||
|
Loading…
Reference in New Issue
Block a user