logo

sshpaste

Simple paste script to a server having SSH+HTTP daemons
commit: 762c53b36de3bc3bb27ed13dcac1b05a6e931c2f
parent: 0f2eb0af79a67f44985dc541f83f3f4ad25e0daf
Author: Haelwenn (lanodan) Monnier <contact@hacktivis.me>
Date:   Mon, 30 Apr 2018 01:16:17 +0200

sshpaste: Use -t instead of /tmp/ for mktemp

Diffstat:

Msshpaste4++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/sshpaste b/sshpaste @@ -31,14 +31,14 @@ sshpaste_file() { } sshpaste_xclip() { - temporary_file="$(mktemp /tmp/sshpaste_xclip.XXXXX.raw)" + temporary_file="$(mktemp -t sshpaste_xclip.XXXXX.raw)" xclip -o > "${temporary_file}" || die "xclip output" sshpaste_file "${temporary_file}" rm -f "${temporary_file}" } sshpaste_command() { - temporary_file="$(mktemp /tmp/sshpaste_command.XXXXX.log)" + temporary_file="$(mktemp -t sshpaste_command.XXXXX.log)" sh -x -c "$*" > "${temporary_file}" 2>&1 #echo "${PS4}$*" > "${temporary_file}" #sh -c "$*" >> "${temporary_file}" 2>&1