-
Notifications
You must be signed in to change notification settings - Fork 3
/
pantheon-multidev-create
executable file
·53 lines (42 loc) · 1.24 KB
/
pantheon-multidev-create
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
#!/bin/bash
# Bash script to create a new Pantheon multidev environment.
# Include all of the subscripts that we need.
DIR="${BASH_SOURCE%/*}"
if [[ ! -d "$DIR" ]]; then DIR="$PWD"; fi
. "$DIR/functions/pantheon-authenticate"
. "$DIR/functions/pantheon-choose-site"
. "$DIR/functions/pantheon-get-framework"
. "$FUNCTIONS_DIR/pantheon-get-multidev-url"
. "$DIR/functions/pantheon-multidev-create"
. "$DIR/functions/pantheon-script-colours"
. "$DIR/functions/pantheon-terminus-check"
. "$DIR/functions/drupal/drupal-check-features"
. "$DIR/functions/drupal8/drupal8-check-config-management"
# Uncomment for debugging.
#set -x
SUGGESTEDSITENAME=$1
if [ "$SUGGESTEDSITENAME" == "" ]; then
terminus_check
terminus_authenticate
fi
SITENAME=''
choose_site "$SUGGESTEDSITENAME" SITENAME
FRAMEWORK=''
get_framework "$SITENAME" FRAMEWORK
SUGGESTEDMULTIDEV=$2
MULTIDEV=''
multidev_create "$SITENAME" "$FRAMEWORK" "$SUGGESTEDMULTIDEV" MULTIDEV
echo "multidev is: $MULTIDEV"
case $FRAMEWORK in
drupal)
drupal_check_features "$SITENAME" "$MULTIDEV"
;;
drupal8)
drupal8_check_config_management "$SITENAME" "$MULTIDEV"
;;
esac
URL=''
get_multidev_url $SITENAME $MULTIDEV URL
echo -e "Multidev URL:"
echo -e " $URL"
echo -e "Thanks. All done."