From 23fc2049ca636195fc65e89c5f3b773d38b6882f Mon Sep 17 00:00:00 2001 From: slakmagik Date: Fri, 12 Nov 2010 03:15:55 +0000 Subject: [PATCH] corrected a problem in dir_init() w/older bashes Changed an implicit array reference to DI_OUTPUT to an explicit one. Also made a potential error message declare its origin. --- src/usr/sbin/sbopkg | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/usr/sbin/sbopkg b/src/usr/sbin/sbopkg index d070257..0050495 100755 --- a/src/usr/sbin/sbopkg +++ b/src/usr/sbin/sbopkg @@ -282,7 +282,7 @@ dir_init() { DI_OUTPUT+=( "${DI_OUTPUT_LINES[$i]}" ) fi done - if [[ $DI_OUTPUT ]]; then + if [[ ${DI_OUTPUT[*]} ]]; then # Keep DI_OUTPUT_LINES and the 'table headers' aligned, too. cat << EOF @@ -324,7 +324,7 @@ EOF for ((i=0; i<${#DIR_VARS[*]}; i++)); do if [ ! -w ${DIR_VARS[$i]} ]; then - echo ${DIR_VARS[$i]} not writable + echo $SCRIPT: ${DIR_VARS[$i]} not writable ERROR=nowrite fi done