mirror of
https://github.com/envmodules/modules.git
synced 2026-06-14 00:42:43 +08:00
contrib: fix var unbound issue on 'mt' with older bash
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user