-
Notifications
You must be signed in to change notification settings - Fork 0
/
build_dv.sh
executable file
·63 lines (42 loc) · 1.24 KB
/
build_dv.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
60
#!/bin/bash
module switch PrgEnv-cray PrgEnv-gnu 2> /dev/null
current_path=$(pwd)
code_source_path=$current_path/src/dv
if [ "$1" == "install" ]; then
cp $current_path/build/bin/simfs /usr/bin/
exit 0
fi
build_path=$current_path/build
workspace_path=$current_path/workspace
dvlib_path=$current_path/build/lib/
target_path=$current_path/build/bin
mkdir -p $target_path
mkdir -p $build_path
mkdir -p $workspace_path
echo $LUA_PATH
if [ -z "$LUA_PATH" ]; then
LUA_PATH=$current_path/lua
fi
if [ -z "$LUA_LIB_PATH" ]; then
export LUA_LIB_PATH=$LUA_PATH/
fi;
if [ -z "$LUA_INCLUDE_PATH" ]; then
export LUA_INCLUDE_PATH=$LUA_PATH/
fi;
echo "Compiling SimFS ($code_source_path -> $build_path)"
cd $build_path
cmake -DSIMFS_INSTALL_PATH=$target_path -DSIMFS_WORKSPACE_PATH=$workspace_path -DSIMFS_DVLIB_PATH=$dvlib_path $code_source_path
make -j 8 simfs
#make -j 8 stop_dv
#make -j 8 dv_status
make -j 8 check_dv_config_file
cd $current_path
#
echo "installing binaries to $target_path"
cp $build_path/simfs $target_path/
#cp $build_path/stop_dv $target_path/
#cp $build_path/dv_status $target_path/
cp $build_path/check_dv_config_file $target_path/
echo "Installing examples"
bash dv_config_files/configure.sh $current_path
echo "Done!"