Commit a4147e75 authored by Kevin Paxman's avatar Kevin Paxman
Browse files

Merge branch 'kpaxman-smarter-rebuild-defaults' into 8.x-3.x

parents 8de79dc3 fd0ba80d
......@@ -83,6 +83,18 @@ else
fi
if [ ${interactivity} == 1 ]; then
# Set up defaults.
script_path=`pwd`
gesso_root_default='/var/www/html'
if [[ "$script_path" == *"app"* ]]; then
drupal_root_default='/app'
gesso_root_default='/app'
elif [[ "$script_path" == *"alt"* ]]; then
drupal_root_default='/var/www/drupal8alt'
else
drupal_root_default='/var/www/drupal8'
fi
# Ask install questions.
echo "What would you like to do?"
echo "1 = Rebuild profile (non-development)."
echo "2 = Rebuild profile and gesso (for development)."
......@@ -108,22 +120,14 @@ if [ ${interactivity} == 1 ]; then
build_type='vagrant'
fi
if [ ${build_type} == "lando" ]; then
printf "\nDrupal root directory: [/app]: "
else
printf "\nDrupal root directory: [/var/www/drupal8]: "
fi
printf "\nDrupal root directory: [$drupal_root_default]: "
read -r drupal_root_dir
printf "\nGesso branch/tag: [8.x-3.x]: "
read -r gesso_branch_tag
if [ ${build_option} == "2" ] || [ ${build_option} == "3" ]; then
if [ ${build_type} == "lando" ]; then
printf "\nGesso root directory: [/app]: "
else
printf "\nGesso root directory: [/var/www/html]: "
fi
printf "\nGesso root directory: [$gesso_root_default]: "
read -r gesso_root_dir
fi
......@@ -139,19 +143,11 @@ if [[ -z $gesso_branch_tag ]]; then
fi
if [[ -z $drupal_root_dir ]]; then
if [[ ${build_type} == "lando" ]]; then
drupal_root_dir=/app
else
drupal_root_dir=/var/www/drupal8
fi
drupal_root_dir="$drupal_root_default"
fi
if [[ -z $gesso_root_dir ]]; then
if [[ ${build_type} == "lando" ]]; then
gesso_root_dir=/app
else
gesso_root_dir=/var/www/html
fi
gesso_root_dir="$gesso_root_default"
fi
if [ ${build_option} == "1" ]; then
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment