Handle single or double quotes
This commit is contained in:
parent
64378bb2ef
commit
3fa84aa428
|
@ -93,8 +93,6 @@ function detect_apps {
|
|||
fi
|
||||
done
|
||||
|
||||
echo "Apps available: $APPS_AVAILABLE"
|
||||
|
||||
function_check get_apps_installed
|
||||
get_apps_installed
|
||||
get_apps_installed_names
|
||||
|
@ -118,10 +116,13 @@ function choose_apps_for_variant {
|
|||
APPS_AVAILABLE+=("${app_name}")
|
||||
|
||||
if grep -q "VARIANTS=" ${filename}; then
|
||||
variants_list="$(cat ${filename} | grep "VARIANTS=" | awk -F '=' '{print $2}' | awk -F "'" '{print $2}')"
|
||||
variants_line=$(cat ${filename} | grep "VARIANTS=")
|
||||
if [[ "$variants_line" == *"'"* ]]; then
|
||||
variants_list=$(echo "$variants_line" | awk -F '=' '{print $2}' | awk -F "'" '{print $2}')
|
||||
else
|
||||
variants_list=$(echo "$variants_line" | awk -F '=' '{print $2}' | awk -F '"' '{print $2}')
|
||||
fi
|
||||
if [[ "${variants_list}" == 'all'* || \
|
||||
"${variants_list}" == 'any'* || \
|
||||
"${variants_list}" == 'full'* || \
|
||||
"${variants_list}" == "$variant_name "* || \
|
||||
"${variants_list}" == *" $variant_name "* || \
|
||||
"${variants_list}" == *" $variant_name" ]]; then
|
||||
|
|
Loading…
Reference in New Issue