qsgen2/include/common/input_to_array.inc

12 lines
245 B
PHP
Raw Normal View History

2024-01-28 18:32:26 +01:00
# Converts a --with=option,option2 into an array
# Usage: InputToArray <input-string>
# Returns: $InputArray
function InputToArray () {
if [[ ${@} =~ "--with" ]]; then
InputArray=( $( echo ${@} | cut -d= -f2 | sed -e 's/\,/\ /g' ) )
fi
}