From e0b2027f702d7762b406630adebb1961abe6826f Mon Sep 17 00:00:00 2001 From: philippe lhardy Date: Mon, 16 Feb 2015 20:18:45 +0100 Subject: [PATCH] minor change use arrays instead of string space separated in one bash script Signed-off-by: philippe lhardy --- doit.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/doit.sh b/doit.sh index ac8ac9a..52cb5df 100755 --- a/doit.sh +++ b/doit.sh @@ -5,15 +5,15 @@ do_code() background=$1 find java/org/artisanlogiciel/games/ -name "*.java" | { - s= + s=() while read codeline do - javafile=$(basename $codeline) + javafile=$(basename "$codeline") javaclass=${javafile/.java/} echo "$javafile $javaclass" - s="$s $javaclass $codeline" + s+=("$javaclass" "$codeline") done - javaclass=$($DIALOG --menu "Run it" 20 100 10 $s 3>&1 1>&2 2>&3) + javaclass=$($DIALOG --menu "Edit it" 20 100 10 ${s[@]} 3>&1 1>&2 2>&3) if [[ -n $javaclass ]] then pushd java @@ -51,7 +51,7 @@ action=initial while [[ $action != quit ]] do - action=$($DIALOG --menu "Run it" 20 80 8 run "Run it" test "Test it" readme "Read me" code "Code" codebg "Code in background" quit "Quit" 3>&1 1>&2 2>&3) + action=$($DIALOG --menu "Ultra Light IDE" 20 80 8 run "Run it" test "Test it" readme "Read me" code "Code" codebg "Code in background" quit "Quit" 3>&1 1>&2 2>&3) if [[ $action == run ]] then