diff options
Diffstat (limited to '%HOME%/.bash_utils')
-rw-r--r-- | %HOME%/.bash_utils/cxx.sh | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/%HOME%/.bash_utils/cxx.sh b/%HOME%/.bash_utils/cxx.sh index d5ce371..438f798 100644 --- a/%HOME%/.bash_utils/cxx.sh +++ b/%HOME%/.bash_utils/cxx.sh @@ -117,7 +117,10 @@ runc() ( local build_dir build_dir="$( mktemp --directory )" - trap "$( printf -- 'popd > /dev/null && rm -rf -- %q' "$build_dir" )" 0 + local rm_build_dir + rm_build_dir="$( printf -- 'popd > /dev/null && rm -rf -- %q' "$build_dir" )" + + trap "$rm_build_dir" EXIT pushd "$build_dir" > /dev/null local output_name |