forked from kvtsang/Supera
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.sh
28 lines (24 loc) · 799 Bytes
/
setup.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
#!/bin/bash
# clean up previously set env
if [[ -z $FORCE_SUPERA_DIR ]]; then
where="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
SUPERA_DIR=${where}
else
SUPERA_DIR=$FORCE_SUPERA_DIR
fi
experiment=$1
if [ -z $experiment ]; then
echo "You must specify an experiment in the argument of setup.sh"
echo "Options: `ls $SUPERA_DIR/experiments`"
unset experiment;
unset SUPERA_DIR;
else
if [ ! -d "$SUPERA_DIR/experiments/$experiment" ]; then
echo "Could not locate $experiment directory... make sure that exists under experiments dir"
else
export SUPERADIR=$SUPERA_DIR;
ln -sf $SUPERA_DIR/experiments/$experiment/FMWKInterface.* $SUPERA_DIR;
ln -sf $SUPERA_DIR/experiments/$experiment/CMakeLists.txt $SUPERA_DIR;
echo "set up for $experiment"
fi
fi