-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrun.sh
executable file
·41 lines (31 loc) · 916 Bytes
/
run.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
#!/bin/sh
cloneDependency()
{
dep="$1"
rep="$2"
if [ "$2" == "" ]; then
rep="requirejs"
fi
if [ ! -d "$dep" ]; then
echo "INFO: Cloning ${rep}/${dep}..."
RESULT=`git clone https://github.com/${rep}/${dep}.git`
if [ "$RESULT" != "" ]; then
echo "FAILED: This build requires ${rep}/${dep}, but failed with ${RESULT}!"
exit $RESULT;
fi
fi
echo "INFO: Updating ${rep}/${dep}..."
cd $dep && git fetch origin && git reset --hard origin/master && git pull > /dev/null
RESULT="$?"
cd ..
if [ "$RESULT" != "0" ]; then
echo "FAILED: Unable to get latest ${rep}/${dep}, failed with ${RESULT}!"
exit 127;
fi
}
cloneDependency "text"
cloneDependency "i18n"
cloneDependency "domReady"
cloneDependency "requirejs" "jrburke"
cloneDependency "reqwirejs" "tkissing"
npm install && node server.js