forked from smirn0v/objclint
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinstall.sh
executable file
·44 lines (33 loc) · 945 Bytes
/
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
#!/bin/sh -e -o pipefail
export THIRDPARTY_DIR="`pwd`/thirdparty"
export STATUS_SH="`pwd`/scripts/status.sh"
export ERROR_LOG="objclint-setup-error.log"
function exit_error {
"${STATUS_SH}" -e "$1"
echo
exit 1
}
echo
echo "Objclint 0.1 Alpha"
echo "=================="
echo
mkdir -p "${THIRDPARTY_DIR}"
set +e
rm "${ERROR_LOG}" 2> /dev/null
exec 2>"${ERROR_LOG}"
START_TIME=$(date +%s)
./scripts/setup_spidermonkey.sh && \
./scripts/setup_llvm.sh && \
./scripts/build_objclint.sh && \
./scripts/install_objclint.sh
if [ $? -gt 0 ]; then exit_error "Failed to setup. See ${ERROR_LOG} for details"; fi
END_TIME=$(date +%s)
DIFF_TIME=$(echo "scale=1;($END_TIME - $START_TIME)/60" | bc)
echo
echo "#################################################"
echo
echo "Whew, that was a long trip! Took ${DIFF_TIME} minutes."
echo "Now you can open your project directory and run 'objclint-xcodebuild'"
echo
echo "...Have fun..."
echo