-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.sh
executable file
·74 lines (67 loc) · 1.53 KB
/
build.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
#!/bin/bash
# Go up a folder (ONLY IF NEEDED), so khamake is called from the right directory
FILETOCHECK="make.js"
if [ -s "$FILETOCHECK" ]
then
cd ..
fi
echo "___________________________________"
echo "khamake builder"
echo "type q to quit."
echo "___________________________________"
# Target input.
#platform_input
echo "Specify target:"
echo ""
echo "The possible options are:"
echo " * windows"
echo " * linux"
echo " * android"
echo " * windowsrt"
echo " * osx"
echo " * ios"
echo " * html5"
echo " * flash"
echo " * wpf"
echo " * java"
echo " * psm"
echo " * dalvik"
echo " * tizen"
echo "___________________________________"
read target
if [ "$target" == "q" ]; then
echo "Quitting..."
echo "___________________________________"
exit
fi
# Options input.
echo "Specify options:"
read options
# Setting true to 0
TRUE=0
# Checks if the input matches any of the valid targets
if [ "$target" == "windows" ] ||
[ "$target" == "linux" ] ||
[ "$target" == "android" ] ||
[ "$target" == "windowsrt" ] ||
[ "$target" == "osx" ] ||
[ "$target" == "ios" ] ||
[ "$target" == "html5" ] ||
[ "$target" == "flash" ] ||
[ "$target" == "wpf" ] ||
[ "$target" == "java" ] ||
[ "$target" == "psm" ] ||
[ "$target" == "dalvik" ] ||
[ "$target" == "tizen" ]; then
TRUE=1
fi
#If the input is valid call Hake
#If True is not defined ( no valid target ) jump back to the start
if [ "$TRUE" == "1" ]; then
node Kha/make "$target" "$options"
else
echo "Unsupported platform..."
fi
#end_of_file
echo "___________________________________"
exit