-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathpost_install.sh
executable file
·60 lines (45 loc) · 2 KB
/
post_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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
#!/bin/bash
# DO NOT CHANGE these paths unless you're sure of what you're doing.
# The paths below should be coherent with the ones specified into
# Epic Eplorer source code and Trimaran sources.
BASE_DIR=$HOME
WORKSPACE=$BASE_DIR/trimaran-workspace
TRIMARAN_ROOT=$BASE_DIR/trimaran
EPIC_SOURCE=$BASE_DIR/epic
# checking trimaran installation ###############################
echo ""
echo "** Checking for trimaran installation files..."
if [ -e $TRIMARAN_ROOT/scripts ]; then
echo " ** Ok, found a trimaran 4 installation, copying new tcc script..."
cp $EPIC_SOURCE/MISC_FILES/tcc $TRIMARAN_ROOT/scripts
else
echo " > Missing $TRIMARAN_ROOT/scripts directory !"
echo " check your trimaran installation!"
exit 1
fi
# checking epic workspace ######################################
echo "** Checking for necessary files in $WORKSPACE..."
if [ -e $WORKSPACE/epic-explorer ]; then
echo " ** WARNING: found a previous $WORKSPACE/epic-explorer directory"
echo "It's strongly suggested to move/rename it in order to avoid conflicts with "
echo "newer versions."
exit -1
else # missing workspace
echo " > Creating $WORKSPACE/epic-explorer directory"
mkdir -p $WORKSPACE/epic-explorer
fi
echo " > Copying SUBSPACES directory..."
cp -Rf $EPIC_SOURCE/SUBSPACES $WORKSPACE/epic-explorer
echo " > Copying m5elements configuration files..."
cp -Rf $EPIC_SOURCE/MISC_FILES/m5elements $WORKSPACE/epic-explorer/
echo " > Creating $WORKSPACE/epic-explorer/machines directory..."
cp -Rf $EPIC_SOURCE/MISC_FILES/machines $WORKSPACE/epic-explorer/
echo " > Creating $WORKSPACE/epic-explorer/step_by_step directory..."
mkdir -p $WORKSPACE/epic-explorer/step_by_step
cp -Rf $EPIC_SOURCE/MISC_FILES/machines $WORKSPACE/epic-explorer/step_by_step
cp -Rf $EPIC_SOURCE/MISC_FILES/m5elements $WORKSPACE/epic-explorer/step_by_step
echo " > Creating a new epic_default.conf"
cp -f $EPIC_SOURCE/MISC_FILES/epic_default.conf $WORKSPACE/epic-explorer
echo " ** Done. **"
echo " Just type ./epic to start epic explorer!"
echo ""