From 3d3382cadcd032d1e58c95ee82262f91424ad98b Mon Sep 17 00:00:00 2001 From: Matthias Braendli Date: Tue, 13 Jan 2015 09:23:28 +0100 Subject: Fix shell script bugs --- radio.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'radio.sh') diff --git a/radio.sh b/radio.sh index b39eb39..b6eb305 100755 --- a/radio.sh +++ b/radio.sh @@ -27,7 +27,7 @@ sigint_trap() { set -e # check number of arguments -if [[ "$#" < 1 ]] ; then +if [[ "$#" -lt 1 ]] ; then echo "Usage $0 radio-id" echo "You must specify which radio to start" exit 1 @@ -35,7 +35,7 @@ fi RADIO=$1 -if [ ${radios[$RADIO]+_} ] ; then +if [ "${radios[$RADIO]+_}" ] ; then COMMAND=${radios[$RADIO]} trap sigint_trap SIGINT -- cgit v1.2.3