logo

sshpaste

Simple paste script to a server having SSH+HTTP daemons
commit: 0f2eb0af79a67f44985dc541f83f3f4ad25e0daf
parent: 127381f2165c27d4a0e695a4a259eeec366b0e55
Author: Haelwenn (lanodan) Monnier <contact@hacktivis.me>
Date:   Mon, 30 Apr 2018 00:55:49 +0200

sshpaste: Remove temporary file in die()

Diffstat:

Msshpaste6++++++
1 file changed, 6 insertions(+), 0 deletions(-)

diff --git a/sshpaste b/sshpaste @@ -12,6 +12,11 @@ die() { else echo "Failed, exiting…" >&2 fi + if [ -e "${temporary_file}" ] + then + rm -f "${temporary_file}" + fi + exit } @@ -49,6 +54,7 @@ sshpaste_usage() { } flag_x= +temporary_file= while getopts "xc:" opt do