-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathJUMPConfig.sh
executable file
·149 lines (133 loc) · 4.2 KB
/
JUMPConfig.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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
#!/bin/bash
#
# Automatically Link Header Files
#
###### ###### ###### ###### ###### ###### ###### ######
# Print Header.
printHeader() {
echo 'JUMP Library Installation Script 1.0'
echo ''
}
###### ###### ###### ###### ###### ###### ###### ######
# Print Usage Help.
printHelp() {
echo 'Usage:'
echo ' JUMPConfig.sh <option>'
echo ''
echo ' -configure Configure all JUMP Headers.'
echo ' -clean Clean all configured JUMP Headers.'
echo ' -cleanconfigure Clean all configured JUMP Headers and install again.'
echo ''
}
###### ###### ###### ###### ###### ###### ###### ######
# Clean all.
cleanAll() {
# if Headers Directory exist...
if [ -d "Headers" ]; then
echo 'Cleaning...'
rm -r Headers
# Confirm.
if [ ! -d "Headers" ]; then
echo Ok!
else
echo "Can't delete! Please check..."
fi
else
echo "Can't clean because the 'Headers' folder doesn't exist."
fi
echo ''
}
###### ###### ###### ###### ###### ###### ###### ######
# update libs.
update_libs() {
echo ""
echo "Initializing GIT submodules..."
git submodule init
echo ''
######## ######## ######## ######## ######## ######## ########
echo "Cloning (updating) GIT submodules..."
git submodule update
echo ''
}
###### ###### ###### ###### ###### ###### ###### ######
# Configure
configure() {
update_libs
# if Headers Directory doesn't exist...
if [ ! -d "Headers" ]; then
echo "Creating Main Headers Directory..."
mkdir Headers
else
echo "'Headers' folder already exist, you must clean it first."
echo ''
return
fi
echo "Acessing Main Headers Directory..."
cd Headers
######## ######## ######## ######## ######## ######## ########
# if JUMPCore Directory exist...
if [ -d "../JUMPCore/Headers" ]; then
echo "Linking JUMPCore Headers..."
ln -s ../JUMPCore/Headers/* .
echo "Linking Chameleon UIKit (For Mac OS Compatiblity)..."
ln -s ../JUMPCore/Third-Part\ Libraries/UIKit.framework/Headers/* .
fi
######## ######## ######## ######## ######## ######## ########
# if JUMPData Directory exist...
if [ -d "../JUMPData/Headers" ]; then
echo "Linking JUMPData Headers (Includes JSON Libraries and Google Toolbox For Mac)..."
ln -s ../JUMPData/Headers/* .
ln -s ../JUMPData/Third-Part\ Libraries/Google\ Toolbox\ For\ Mac/Headers/* .
ln -s ../JUMPData/Third-Part\ Libraries/JSON\ Framework/Headers/* .
fi
######## ######## ######## ######## ######## ######## ########
# if JUMPDatabase Directory exist...
if [ -d "../JUMPDatabase/Headers" ]; then
echo "Linking JUMPDatabase Headers... (Includes 'coredata-threadsafe' headers)..."
ln -s ../JUMPDatabase/Headers/* .
ln -s ../JUMPDatabase/Libraries/coredata-threadsafe/IAThreadSafeCoreData/IAThreadSafeCoreData/*.h .
fi
######## ######## ######## ######## ######## ######## ########
# if JUMPNetwork Directory exist...
if [ -d "../JUMPNetwork/Headers" ]; then
echo "Linking JUMPNetwork Headers (Includes AISHTTPRequestLibrary)..."
ln -s ../JUMPNetwork/Headers/* .
ln -s ../JUMPNetwork/Libraries/AISHTTPRequestLibrary/Classes/*.h .
ln -s ../JUMPNetwork/Libraries/AISHTTPRequestLibrary/Classes/CloudFiles/*.h .
ln -s ../JUMPNetwork/Libraries/AISHTTPRequestLibrary/Classes/S3/*.h .
ln -s ../JUMPNetwork/Libraries/AISHTTPRequestLibrary/External/Reachability/*.h .
fi
######## ######## ######## ######## ######## ######## ########
# if JUMPCore Directory exist...
if [ -d "../JUMPUserInterface/Headers" ]; then
echo "Linking JUMPUserInterface Headers..."
ln -s ../JUMPUserInterface/Headers/* .
fi
######## ######## ######## ######## ######## ######## ########
# if JUMPCore Directory exist...
if [ -d "../JUMPLogger/Headers" ]; then
echo "Linking JUMPLogger Headers (Includes Log4CocoaTouch and NSLogger)..."
ln -s ../JUMPLogger/Headers/* .
ln -s ../JUMPLogger/Libraries/Log4CocoaTouch/Headers/* .
ln -s ../JUMPLogger/Libraries/NSLogger/Headers/* .
fi
}
###### ###### ###### ###### ###### ###### ###### ######
# Conditional parameters.
printHeader
case "$1" in
"-configure")
configure
;;
"-clean")
cleanAll
;;
"-cleanconfigure")
cleanAll
configure
;;
*)
# Help so..
printHelp
;;
esac