logo

sshpaste

Simple paste script to a server having SSH+HTTP daemons
commit: 64a8f5947cd475adbf5505d68b810fe50c500412
parent: 5d2ac3cb2c355d48388453ecfcb2a548b0b74c26
Author: Haelwenn (lanodan) Monnier <contact@hacktivis.me>
Date:   Sun,  6 May 2018 20:31:37 +0200

sshpaste: No multiple options, fix syntax

Diffstat:

Msshpaste7++++---
1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/sshpaste b/sshpaste @@ -55,14 +55,15 @@ sshpaste_usage() { } flag_x= +flag_c= temporary_file= while getopts "xhc:" opt do case $opt in 'c') - [ -z flag_x ] && die "Cannot have both -x and -c" - [ -z flag_c ] && die "Cannot have two -c, use ; if you want multiple commands" + [ -z $flag_x ] && die "Cannot have both -x and -c" + [ -z $flag_c ] && die "Cannot have two -c, use ; if you want multiple commands" flag_c=1 opt_command="${OPTARG}" ;; @@ -71,7 +72,7 @@ do exit 0 ;; 'x') - [ -z flag_c ] && die "Cannot have both -x and -c" + [ -z $flag_c ] && die "Cannot have both -x and -c" flag_x=1 ;; '?')