-
-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathSetupEnvironment.sh
More file actions
executable file
·41 lines (26 loc) · 935 Bytes
/
SetupEnvironment.sh
File metadata and controls
executable file
·41 lines (26 loc) · 935 Bytes
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
#!/bin/bash
# Tired of trying to decipher whether Travis is showing me cached logs or not.
date -u
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
if [ -n "$TRAVIS" ]; then
echo 'Starting Travis Provisioning'
if [ ! -d "$DIR/resources" ]; then
DIR="$( dirname $(find $TRAVIS_BUILD_DIR -name '.dovecottestingmark') )"
fi
sudo cp -Rp $DIR/resources /resources
sudo /bin/bash /resources/Scripts/Provision.sh
sudo /bin/bash /resources/Scripts/SSL.sh
else
# Since not in travis, lets load up a system with vagrant
echo 'Starting Vagrant Provisioning'
cd $DIR/vagrant
VAGRANTSTATUS=$(vagrant status)
# If vagrant is running already, reprovision it so it has fresh email boxes.
if echo "$VAGRANTSTATUS" | egrep -q "running" ; then
vagrant provision
else
vagrant up --provision
fi
cd $DIR
fi
echo 'Environment has finished being setup'