-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfigure
executable file
·56 lines (49 loc) · 1.26 KB
/
configure
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
#!/bin/bash
BUILD_ICEF=${1:-"nobuild"}
if [ -d "ASIMSpec" ]; then
echo "Updateing ASIMSpec repository..."
cd ASIMSpec
git pull
cd ..
else
echo "Cloneing ASIMSpec repository..."
git clone https://github.com/InterlaceProject/ASIMSpec
echo "ASIMSpec cloned."
fi
if [ -d "icef" ]; then
echo "Updateing ICEF repository..."
cd icef
UPSTREAM='@{u}'
LOCAL=$(git rev-parse @)
REMOTE=$(git rev-parse "$UPSTREAM")
BASE=$(git merge-base @ "$UPSTREAM")
if [ $LOCAL = $REMOTE ]; then
echo "Nothing to update."
elif [ $LOCAL = $BASE ]; then
git pull
BUILD_ICEF="rebuild"
echo "ICEF needs rebuild..."
elif [ $REMOTE = $BASE ]; then
echo "There are uncommitted changes to ICEF project, kindly solve manually."
exit
else
echo "ICEF remote and local repositories diverged, kindly solve manually."
exit
fi
cd ..
else
echo "Cloneing ICEF repository..."
# biomics repository
#git clone https://github.com/biomics/icef.git icef
# Interlace repository
git clone https://github.com/InterlaceProject/icef.git
echo "ICEF cloned."
BUILD_ICEF="rebuild"
fi
# build container
docker build -t asim .
# build framework
if [ "$BUILD_ICEF" == "rebuild" ]; then
echo "building framework..."
./execute /home/buildICEFDocker.sh
fi