From d0fc0be445bc72bb92aecf1bb1b59aaaca99fb6a Mon Sep 17 00:00:00 2001 From: Xavier Delaruelle Date: Tue, 2 Jul 2019 10:40:55 +0200 Subject: [PATCH] contrib: fix var unbound issue on 'mt' with older bash --- contrib/mt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/contrib/mt b/contrib/mt index bfb8f88d..ddd9a29b 100755 --- a/contrib/mt +++ b/contrib/mt @@ -76,7 +76,8 @@ if [ $# -gt 0 ]; then if [ -e $i ]; then fname=${i##*/} # build list of unique file names - if [[ ! " ${testfnames[*]} " =~ " $fname " ]]; then + if [ ${#testfnames[@]} -eq 0 ]\ + || [[ ! " ${testfnames[*]} " =~ " $fname " ]]; then testfnames+=($fname) fi fi