Silence pushd and popd output
[drupal-init-tools.git] / libexec / create-profile.sh
index 57e3731..a8ce396 100755 (executable)
@@ -68,7 +68,7 @@ PROFILE_DEST_DIR="${PROJECT_ROOT}/${PROFILE_MACHINE_NAME}"
 
 [ -d "${PROFILE_DEST_DIR}" ] && { echo "Aborting, '${PROFILE_DEST_DIR}' already exists." 1>&2; exit 1; }
 
 
 [ -d "${PROFILE_DEST_DIR}" ] && { echo "Aborting, '${PROFILE_DEST_DIR}' already exists." 1>&2; exit 1; }
 
-pushd "$WEB_ROOT"
+pushd "$WEB_ROOT" > /dev/null
 
 CURRENT_PROFILE="$($DRUSH php-eval "echo drupal_get_profile();")"
 CURRENT_PROFILE_PATH="$($DRUSH php-eval "echo drupal_get_path('profile', '${CURRENT_PROFILE}');")"
 
 CURRENT_PROFILE="$($DRUSH php-eval "echo drupal_get_profile();")"
 CURRENT_PROFILE_PATH="$($DRUSH php-eval "echo drupal_get_path('profile', '${CURRENT_PROFILE}');")"
@@ -101,7 +101,7 @@ $DRUPAL_CONSOLE generate:profile \
   --no-interaction
 
 # Copy private code and data from the currently installed profile
   --no-interaction
 
 # Copy private code and data from the currently installed profile
-pushd "$CURRENT_PROFILE_PATH"
+pushd "$CURRENT_PROFILE_PATH" > /dev/null
 
 find . -maxdepth 1 -type d ! -name "tests" -printf "%P\n" |
   while read -r dir;
 
 find . -maxdepth 1 -type d ! -name "tests" -printf "%P\n" |
   while read -r dir;
@@ -123,7 +123,7 @@ find . -maxdepth 1 -type f ! -name "*.info.yml" -printf "%P\n" |
     fi
   done
 
     fi
   done
 
-popd
+popd > /dev/null
 
 # Basically do what's suggested in the "Configuration" section here:
 # https://www.drupal.org/docs/8/creating-distributions/how-to-write-a-drupal-8-installation-profile
 
 # Basically do what's suggested in the "Configuration" section here:
 # https://www.drupal.org/docs/8/creating-distributions/how-to-write-a-drupal-8-installation-profile
@@ -152,4 +152,4 @@ then
   echo "Check that the code of the created profile refers to the new profile name."
 fi
 
   echo "Check that the code of the created profile refers to the new profile name."
 fi
 
-popd
+popd > /dev/null