-
Notifications
You must be signed in to change notification settings - Fork 3
/
pantheon-multidev-merge
executable file
·57 lines (46 loc) · 1.58 KB
/
pantheon-multidev-merge
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
53
54
55
56
#!/bin/bash
# Bash script to run merge a Pantheon multidev into the dev environment.
# Include all of the subscripts that we need.
DIR="${BASH_SOURCE%/*}"
if [[ ! -d "$DIR" ]]; then DIR="$PWD"; fi
. "$DIR/functions/pantheon-script-colours"
. "$DIR/functions/pantheon-terminus-check"
. "$DIR/functions/pantheon-authenticate"
. "$DIR/functions/pantheon-choose-site"
. "$DIR/functions/pantheon-get-framework"
. "$DIR/functions/pantheon-multidev-merge"
. "$DIR/functions/pantheon-multidev-delete"
. "$DIR/functions/drupal/drupal-check-features"
. "$DIR/functions/drupal8/drupal8-check-config-management"
#set -x
SUGGESTEDSITENAME=$1
if [ "$SUGGESTEDSITENAME" == "" ]; then
terminus_check
terminus_authenticate
fi
SITENAME=''
choose_site "$SUGGESTEDSITENAME" SITENAME
FRAMEWORK=''
get_framework "$SITENAME" FRAMEWORK
MULTIDEV=$2
if [ "$MULTIDEV" == "" ]; then
terminus multidev:list $SITENAME
echo -e "Choose a multidev to merge into dev."
read -p "${UNDERLINE}Type the name of a multidev to merge into dev, and press [Enter] to continue:?${NOUNDERLINE} " MULTIDEV;
fi
case $FRAMEWORK in
drupal)
drupal_check_features "$SITENAME" "$MULTIDEV"
hasfeatures=$?
;;
drupal8)
drupal8_check_config_management "$SITENAME" "$MULTIDEV"
hasconfigmanagement=$?
;;
*)
echo -e "This script has no configuration management automation for $FRAMEWORK. Unless this site has Quicksilver configured, you should probably just do everything manually."
;;
esac
multidev_merge "$SITENAME" "$FRAMEWORK" $MULTIDEV
multidev_delete "$SITENAME" "$MULTIDEV" 1
echo -e "Thanks. All done."