forked from wearefrank/frank-runner
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrun.sh
executable file
·72 lines (72 loc) · 2.48 KB
/
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
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
#!/bin/bash
# This file is generated by build.xml
FR_DIR="`pwd`/`dirname $0`/"
if [[ ! -d "${FR_DIR}download/" ]]; then
mkdir "${FR_DIR}download/"
fi
if [[ ! -d "${FR_DIR}build/tmp/build/" ]]; then
mkdir -p "${FR_DIR}build/tmp/build"
fi
FR_DIR="`pwd`/`dirname $0`/"
ZIP=OpenJDK8U-jdk_x64_linux_hotspot_8u252b09.tar.gz
URL=https://github.com/AdoptOpenJDK/openjdk8-binaries/releases/download/jdk8u252-b09/OpenJDK8U-jdk_x64_linux_hotspot_8u252b09.tar.gz
DIR=build/jdk8u252-b09
if [[ "$OSTYPE" == "darwin"* ]]; then
ZIP=${ZIP/linux/mac}
URL=${URL/linux/mac}
fi
DOWNLOAD_HELP="download ${URL} manually, move it to ${FR_DIR}download and restart this script"
if [[ ! -f "${FR_DIR}download/${ZIP}" ]]; then
echo In case of errors ${DOWNLOAD_HELP}
curl -f -o "${FR_DIR}download/${ZIP}.tmp" -L ${URL}
retVal=$?
if [[ $retVal -ne 0 ]]; then
echo "Please ${DOWNLOAD_HELP}"
exit $retVal
fi
mv "${FR_DIR}download/${ZIP}.tmp" "${FR_DIR}/download/${ZIP}"
fi
if [[ ! -d "${FR_DIR}${DIR}/" ]]; then
tar --exclude=*/demo --exclude=*/sample --exclude=*/manual --exclude=*/src.zip -xzvf "${FR_DIR}download/${ZIP}" -C "${FR_DIR}build/tmp/build"
retVal=$?
if [[ $retVal -ne 0 ]]; then
echo "Please ${DOWNLOAD_HELP}"
exit $retVal
fi
mv "${FR_DIR}build/tmp/${DIR}" "${FR_DIR}${DIR}"
fi
FR_DIR="`pwd`/`dirname $0`/"
ZIP=apache-ant-1.10.10-bin.tar.gz
URL=https://archive.apache.org/dist/ant/binaries/apache-ant-1.10.10-bin.tar.gz
DIR=build/apache-ant-1.10.10
if [[ "$OSTYPE" == "darwin"* ]]; then
ZIP=${ZIP/linux/mac}
URL=${URL/linux/mac}
fi
DOWNLOAD_HELP="download ${URL} manually, move it to ${FR_DIR}download and restart this script"
if [[ ! -f "${FR_DIR}download/${ZIP}" ]]; then
echo In case of errors ${DOWNLOAD_HELP}
curl -f -o "${FR_DIR}download/${ZIP}.tmp" -L ${URL}
retVal=$?
if [[ $retVal -ne 0 ]]; then
echo "Please ${DOWNLOAD_HELP}"
exit $retVal
fi
mv "${FR_DIR}download/${ZIP}.tmp" "${FR_DIR}/download/${ZIP}"
fi
if [[ ! -d "${FR_DIR}${DIR}/" ]]; then
tar --exclude=*/demo --exclude=*/sample --exclude=*/manual --exclude=*/src.zip -xzvf "${FR_DIR}download/${ZIP}" -C "${FR_DIR}build/tmp/build"
retVal=$?
if [[ $retVal -ne 0 ]]; then
echo "Please ${DOWNLOAD_HELP}"
exit $retVal
fi
mv "${FR_DIR}build/tmp/${DIR}" "${FR_DIR}${DIR}"
fi
export JAVA_HOME="${FR_DIR}build/jdk8u252-b09"
if [[ "$OSTYPE" == "darwin"* ]]; then
export JAVA_HOME="${FR_DIR}build/jdk8u252-b09/Contents/Home"
fi
export ANT_HOME="${FR_DIR}build/apache-ant-1.10.10"
cd "${FR_DIR}"
"${FR_DIR}build/apache-ant-1.10.10/bin/ant" -emacs "$@" run