forked from cross-solution/YAWIK
-
Notifications
You must be signed in to change notification settings - Fork 0
/
install.sh
executable file
·80 lines (64 loc) · 1.29 KB
/
install.sh
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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
#!/bin/bash
PHING=phing.phar
COMPOSER=composer.phar
PROPERTIES=build.properties
VERBOSE=
function usage {
echo "";
echo "-b|--build-properties Location of the build.properties file";
echo "-v|--verbose runs phing.phar in verbose mode";
echo "-h|--help this usage";
echo "";
exit;
}
while [ "$1" != "" ]; do
case $1 in
-b | --build-properties )
shift
PROPERTIES=$1
;;
-v | --verbose )
shift
VERBOSE=-verbose
;;
-? | -h | --help )
usage
exit
;;
esac
shift
done
#
# assume, the script is running within a development environment, if ".git"
# directory exists
#
# Note: this leads to a problem, if you install YAWIK on eg. openshift.
#
if [ -d .git ] || [ "$1"=="devenv" ];
then
DEVENV=1
fi;
#
# Download Phing
#
if [ ! -f $PHING ]
then
echo "Download Phing"
curl -sS http://www.phing.info/get/phing-latest.phar > $PHING
chmod +x $PHING
fi;
#
# Download Composer
#
echo "Installing úsing: $PROPERTIES"
if [ $DEVENV ]
then
if [ ! -f $COMPOSER ]
then
echo "Download Composer"
curl -sS https://getcomposer.org/installer | php
fi;
./$PHING $VERBOSE -Dbuild.properties $PROPERTIES
else
./$PHING $VERBOSE -Dbuild.properties $PROPERTIES generate-autoload-config
fi;