X-Git-Url: http://git.scottworley.com/pinch/blobdiff_plain/a2290fb189bee1da5e985d785e044d1681401ff7..d9a1088a3c1c6131fbd1bd5ea2a2dc10e2427eb2:/tests/lib/test-setup.sh?ds=sidebyside diff --git a/tests/lib/test-setup.sh b/tests/lib/test-setup.sh index 12cf525..4ccc8d9 100644 --- a/tests/lib/test-setup.sh +++ b/tests/lib/test-setup.sh @@ -21,6 +21,9 @@ EOF } -foo_cleanup() { - rm -rf "$repo_dir" "$conf" +test_cleanup() { + if [ "$repo_dir" ];then rm -rf "$repo_dir"; fi + if [ "$conf" ];then rm "$conf"; fi } + +trap test_cleanup EXIT INT TERM