We iterate through the array of GENESIS_REQUESTED_FEATURES and make the following change:
if a specified feature is actually a virtual feature that would be included add a + and remove it from the end
VIRTUAL_FEATURES=( "aws-secret-access-keys" "s3-blobstore-secret-access-keys" "internal-blobstore" "external-db" )
new_features=()
found_virtual_features=()
for feature in ${GENESIS_REQUESTED_FEATURES[@]}; do
if [ $(array_contains "${VIRTUAL_FEATURES[@]}" "${feature}" ) == "y" ]; then
if [ $(array_contains "${GENESIS_REQUESTED_FEATURES[@]}" "+${feature}") == "y" ]; then
new_features+=( "+${feature}" )
found_virtual_features+=( "+${feature}" )
elif [[ $(array_contains "${found_virtual_features[@]}" "${feature}") == "n" ]]; then
new_features+=( "${feature}" )
fi
elif [ $(array_contains "${found_virtual_features[@]}" "${feature}") == "n" ]; then
new_features+=( "${feature}" )
fi
done
GENESIS_REQUESTED_FEATURES=( "${new_features[@]}" )
We iterate through the array of
GENESIS_REQUESTED_FEATURES
and make the following change: if a specified feature is actually a virtual feature that would be included add a+
and remove it from the end