-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathinstall.sh
40 lines (35 loc) · 1.1 KB
/
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
# find cycamore
echo "Give me the relative path to Cycamore"
read -p "> " path
# select archetype
echo "Which archetype would you like to build? [EVER = e, CLOVER = c, NEAR = n]"
read -p "(e/c/n): " archetype
echo "Ok, I will build that right away!"
if [ $archetype == e ]
then
cp /EVER/ever.cc $path/src/ever.cc
cp /EVER/ever.h $path/src/ever.h
cp /EVER/ever_tests.cc $path/src/ever_tests.cc
sed -i '' '/\USE_CYCLUS("cycamore" "reactor")/a\
USE_CYCLUS("cycamore" "ever") \
' $path/CMakeLists.txt
fi
if [ $archetype == c ]
then
cp /CLOVER/clover.cc $path/src/clover.cc
cp /CLOVER/clover.h $path/src/clover.h
cp /CLOVER/clover_tests.cc $path/src/clover_tests.cc
sed -i '' '/\USE_CYCLUS("cycamore" "reactor")/a\
USE_CYCLUS("cycamore" "clover") \
' $path/CMakeLists.txt
fi
if [ $archetype == n ]
then
cp /near.cc $path/src/near.cc
cp /near.h $path/src/near.h
cp /near_tests.cc $path/src/near_tests.cc
sed -i '' '/\USE_CYCLUS("cycamore" "reactor")/a\
USE_CYCLUS("cycamore" "near") \
' $path/CMakeLists.txt
fi
python $path/install.py --clean-build --test