From 0f93379d065d218d264e54d2345c514fa87690b6 Mon Sep 17 00:00:00 2001 From: David Schroeder Date: Thu, 31 Jan 2019 23:49:50 -0600 Subject: [PATCH] Update test.sh --- test.sh | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/test.sh b/test.sh index fa9f618..83b025c 100755 --- a/test.sh +++ b/test.sh @@ -21,11 +21,15 @@ fi function myfunc() { local -n __resultvar="$1" || return 1 - __resultvar[*]="a" - __resultvar[*]="b" - __resultvar[*]="c" - __resultvar[*]="d" - __resultvar[*]="e" + __resultvar[0]="a" + __resultvar[1]="b" + echo 'yes'; + if [ -f /etc/debian_version ] ; then + __resultvar[2]="c" + __resultvar[3]="d" + __resultvar[4]="e" + fi + echo "ok" } # call function that constructs the array with the array name