From af7db40263b514785d092c3081aa27b8b72bfc07 Mon Sep 17 00:00:00 2001 From: Tyler Akins Date: Mon, 15 Jun 2015 12:31:50 -0500 Subject: [PATCH] Using make_self_deleting_tempfile I missed this function earlier --- bin/_blackbox_common.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/bin/_blackbox_common.sh b/bin/_blackbox_common.sh index a2c90c0..c5ecf34 100755 --- a/bin/_blackbox_common.sh +++ b/bin/_blackbox_common.sh @@ -297,7 +297,7 @@ function vcs_relative_path() { function remove_line() { local tempfile - tempfile="${1}.blackbox-temp.${RANDOM}.$$" + make_self_deleting_tempfile tempfile # Ensure source file exists touch "$1" @@ -305,7 +305,6 @@ function remove_line() { # Using cat+rm instead of cp will preserve permissions/ownership cat "$tempfile" > "$1" - rm "$tempfile" } # Determine if a file contains a given line