Update option filter function
This commit is contained in:
12
install.sh
12
install.sh
@@ -43,13 +43,11 @@ function generateModuleOptions() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function filterPasswordOptions() {
|
function filterPasswordOptions() {
|
||||||
local i optname optval
|
local opt= hide=false
|
||||||
for ((i=1; i <= ${#moduleOptions}; i+=2)); do
|
for opt in ${moduleOptions}; do
|
||||||
optname=${moduleOptions[$i]}
|
[[ $opt =~ ^--?.*password ]] && hide=true
|
||||||
optval=${moduleOptions[$i+1]}
|
[[ ${hide} = true ]] && { opt='******'; hide=false }
|
||||||
filteredOptions+=($optname)
|
filteredOptions+=($opt)
|
||||||
[[ $optname =~ password ]] && optval='******'
|
|
||||||
filteredOptions+=($optval)
|
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user