Welcome to mirror list, hosted at ThFree Co, Russian Federation.

setup.sh - github.com/candy-chat/candy.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: ae1dbb80b13b42cd78f7f494ccb3fe545008e0db (plain)
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
#!/usr/bin/env bash
#
# Easy installation for contributing to candy
#
# Copyright 2014 Michael Weibel <michael.weibel@gmail.com>
# Copyright 2015 Adhearsion Foundation Inc <info@adhearsion.com>
# License: MIT
#

# Show errors in case of undefined variables
set -o nounset

echo
echo "Welcome to the Candy Vagrant setup"
echo
echo "This script will setup a Vagrant box with development dependencies on it."
echo "It will also build Candy and run tests to verify that everything is working."
echo
echo "In case of an error, use 'install.log' for log informations."
echo

touch install.log
echo "" > install.log

echo -n "* Booting Vagrant box (this might take a while)..."
if vagrant up --no-provision >> install.log 2>&1
  then echo "done"
else
  echo "failed!"
  echo "Do you have 'vagrant' installed in your PATH?"
  echo "Please check install.log"
  echo
  echo "Aborting"
  exit 2
fi

echo -n "* Provisioning Vagrant box (this might take a few minutes)..."
if vagrant provision >> install.log 2>&1
  then echo "done"
else
  echo "failed!"
  echo "Please check install.log"
  echo
  echo "Aborting"
  exit 2
fi

echo -n "* Building Candy and running tests..."
vagrant ssh -c "cd /vagrant && grunt && grunt test"

echo
echo "Candy is now running on http://localhost:8080"
echo

exit 0