Fix double quoting, suggested by shellcheck
[drupal-init-tools.git] / libexec / create-profile.sh
index 5fe572a..4ccdc9b 100755 (executable)
@@ -20,7 +20,7 @@ set -e
 
 usage() {
   cat <<EOF
 
 usage() {
   cat <<EOF
-usage: drin $(basename $0 .sh) [-h|--help] <title> <machine_name>
+usage: drin $(basename "$0" .sh) [-h|--help] <title> <machine_name>
 
 Create an installation profile from the installed project.
 
 
 Create an installation profile from the installed project.
 
@@ -88,8 +88,8 @@ $DRUPAL_CONSOLE generate:profile \
   --profile="$PROFILE_TITLE" \
   --machine-name="$PROFILE_MACHINE_NAME" \
   --description="Drupal installation profile for $PROFILE_TITLE" \
   --profile="$PROFILE_TITLE" \
   --machine-name="$PROFILE_MACHINE_NAME" \
   --description="Drupal installation profile for $PROFILE_TITLE" \
-  --dependencies=$ENABLED_MODULES \
-  --themes=$ENABLED_THEMES \
+  --dependencies="$ENABLED_MODULES" \
+  --themes="$ENABLED_THEMES" \
   --profile-path="$PROJECT_ROOT" \
   --no-interaction
 
   --profile-path="$PROJECT_ROOT" \
   --no-interaction
 
@@ -107,7 +107,7 @@ find "${PROJECT_ROOT}/${PROFILE_MACHINE_NAME}/config/install" -type f -exec sed
 #fdupes -f -1 "${WEB_ROOT}/core/profiles/standard/config/install/" "${PROJECT_ROOT}/${PROFILE_MACHINE_NAME}/config/install/" | xargs rm
 
 # Export the default content if the default_content module is there
 #fdupes -f -1 "${WEB_ROOT}/core/profiles/standard/config/install/" "${PROJECT_ROOT}/${PROFILE_MACHINE_NAME}/config/install/" | xargs rm
 
 # Export the default content if the default_content module is there
-if echo $ENABLED_MODULES | grep -q default_content;
+if echo "$ENABLED_MODULES" | grep -q default_content;
 then
   $DRUSH default-content-export-references --folder="${PROJECT_ROOT}/${PROFILE_MACHINE_NAME}/content" node
 fi
 then
   $DRUSH default-content-export-references --folder="${PROJECT_ROOT}/${PROFILE_MACHINE_NAME}/content" node
 fi