Wordpress/tools/local-env/start.sh

66 lines
2.7 KiB
Bash
Executable File

#!/bin/bash
# Exit if any command fails
set -e
# Include useful functions
. "$(dirname "$0")/includes.sh"
# Change to the expected directory
cd "$(dirname "$0")/../../"
# Check Node and NVM are installed
. "$(dirname "$0")/install-node-nvm.sh"
# Check Docker is installed and running and launch the containers
. "$(dirname "$0")/launch-containers.sh"
# Set up WordPress Development site.
# Note: we don't bother installing the test site right now, because that's
# done on every time `npm run test-e2e` is run.
. "$(dirname "$0")/install-wordpress.sh"
! read -d '' WORDPRESS <<"EOT"
`-/+osssssssssssso+/-`
./oys+:.` `.:+syo/.
.+ys:. .:/osyyhhhhyyso/:. ./sy+.
/ys: -+ydmmmmmmmmmmmmmmmmmmdy+- :sy/
/h+` -odmmmmmmmmmmmmmmmmmmmmmmmmmmdo- `+h/
:ho` /hmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmds/ `oh:
`sy. /hmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmd+ .ys`
.ho `sdddhhhyhmmmdyyhhhdddddhhhyydmmmmy oh.
.h+ ``-dmmy.`` ``.ymmmmh +h.
`ho ` /mmmmmmmmmmo .dmmmmmmmms ~~ oh`
oy .h` ymmmmmmmmmm: /mmmmmmmmmy` -d. yo
.d- ymy `dmmmmmmmmmd. ymmmmmmmmmh` /my -d.
oy -mmm+ /mmmmmmmmmmy .dmmmmmmmmmy ymm- yo
h+ +mmmd- smmmmmmmmmm+ /mmmmmmmmmm- :mmm+ +h
d/ smmmmh` `dmmmmmmmmmd` smmmmmmmmm: `dmmms /d
d/ smmmmms :mmmmmmmmm+ `dmmmmmmmd. smmmms /d
h+ +mmmmmm/ smmmmmmmh + /mmmmmmmy /mmmmm+ +h
oy -mmmmmmd. `dmmmmmd- +m/ smmmmmd. .dmmmmm- yo
.d- ymmmmmmh :mmmmm+ .dmd- `dmmmm/ ymmmmmy -d.
oy .dmmmmmmo smmmh hmmmh` :mmmy +mmmmmd. yo
`ho -dmmmmmd: `dmd- ommmmms smd- .dmmmmd- oh`
.h+ -dmmmmmd` :m+ -dmmmmmm: `do hmmmmd- +h.
.ho .ymmmmmy + `hmmmmmmmd. :` ommmmy. oh.
`sy. /hmmmm+ ommmmmmmmmy -dmmh/ .ys`
:ho` /hmmd- :mmmmmmmmmmmo `hmh/ `oh:
/h+` -odh` `dmmmmmmmmmmmd: oo- `+h/
/ys: ~~ smmmmmmmmmmmmmd` :sy/
.+ys/. `/osyyhhhhyyso/:` ./sy+.
./oys+:.` `.:+syo/.
`-/+osssssssssssso+/-`
EOT
CURRENT_URL=$(docker-compose $DOCKER_COMPOSE_FILE_OPTIONS run -T --rm cli option get siteurl)
echo -e "\nWelcome to...\n"
echo -e "\033[95m$WORDPRESS\033[0m"
# Give the user more context to what they should do next: Run the environment and start testing!
echo -e "\nOpen $(action_format "$CURRENT_URL") to get started!"
echo -e "\n\nAccess the above install using the following credentials:"
echo -e "Default username: $(action_format "admin"), password: $(action_format "password")"