From: Richard Hartmann Date: Wed, 22 Oct 2014 22:26:30 +0000 (+0200) Subject: vcsh: Use BSD/OS X compatible `mktemp` X-Git-Url: https://git.madduck.net/code/vcsh.git/commitdiff_plain/6facf078b31be6526861303a2d6bc21e636fe139?ds=sidebyside;hp=--cc vcsh: Use BSD/OS X compatible `mktemp` --- 6facf078b31be6526861303a2d6bc21e636fe139 diff --git a/vcsh b/vcsh index e4143de..965f83d 100755 --- a/vcsh +++ b/vcsh @@ -293,9 +293,9 @@ command_exists() { list_untracked() { command_exists comm - temp_file_others=$(mktemp) || fatal 'Could not create temp file' - temp_file_untracked=$(mktemp) || fatal 'Could not create temp file' - temp_file_untracked_copy=$(mktemp) || fatal 'Could not create temp file' + temp_file_others=$(mktemp "${TMPDIR:-/tmp}/tmp.XXXXXXXXXX") || fatal 'Could not create temp file' + temp_file_untracked=$(mktemp "${TMPDIR:-/tmp}/tmp.XXXXXXXXXX") || fatal 'Could not create temp file' + temp_file_untracked_copy=$(mktemp "${TMPDIR:-/tmp}/tmp.XXXXXXXXXX") || fatal 'Could not create temp file' [ -z "$VCSH_OPTION_RECURSIVE" ] && directory_opt="--directory"