Skip to content

Commit

Permalink
tidy tmpdir logic
Browse files Browse the repository at this point in the history
`mkdir -p` is already run elsewhere
  • Loading branch information
casperdcl authored Jul 20, 2020
1 parent dcdf79d commit 51f8850
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions scripts/helpers.sh
Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,7 @@ command_exists() {

get_tmp_dir() {
local tmpdir="${TMPDIR:-${TMP:-${TEMP:-/tmp}}}"
if [ ! -d "$tmpdir" ]; then
local tmpdir=~/tmp
mkdir -p $tmpdir
fi
[ -d "$tmpdir" ] || local tmpdir=~/tmp
echo "$tmpdir/tmux-$EUID-cpu"
}

Expand Down

0 comments on commit 51f8850

Please sign in to comment.