forked from openspim/micromanager
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathprepare-for-build.sh
51 lines (46 loc) · 1.19 KB
/
prepare-for-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
STABLE_FIJI_URL=http://jenkins.imagej.net/job/Stable-Fiji
FIJI_URL=$STABLE_FIJI_URL/lastSuccessfulBuild/artifact/fiji-win32.tar.gz
JDK_URL="http://fiji.sc/cgi-bin/gitweb.cgi?p=java/win32.git;a=snapshot;h=HEAD;sf=tgz"
WD="$(pwd)"
SRC="$(cd ../ && pwd)"
FIJI_JAVA_HOME="$WD/bin_Win32/java/win32/jdk1.6.0_24"
(
cd $SRC &&
if ! test -d 3rdpartypublic
then
echo "Cloning Micro-Manager's 3rdparty libraries" &&
git clone git://github.com/openspim/3rdpartypublic &&
(
cd 3rdpartypublic/ &&
git config remote.origin.pushURL \
[email protected]:/srv/git/mmanager-3rdparty
)
else
(cd 3rdpartypublic && git pull)
fi &&
if ! test -f $FIJI_JAVA_HOME/include/jni.h
then
echo "Downloading and unpacking the JDK" &&
curl "$JDK_URL" |
(
mkdir -p $FIJI_JAVA_HOME &&
cd $FIJI_JAVA_HOME &&
tar --strip-components=2 -xzf -
)
fi &&
(
cd $WD &&
if ! test -f bin_Win32/ImageJ-win32.exe
then
echo "Copying Fiji into Micro-Manager's bin_Win32/ directory" &&
curl $FIJI_URL |
(
cd bin_Win32/ &&
tar --strip-components=1 -xzf - &&
./ImageJ-win32.exe --update add-update-site \
OpenSPIM http://openspim.org/update/ \
[email protected] update/
)
fi
)
)