-
Notifications
You must be signed in to change notification settings - Fork 5
/
make.sh
executable file
·80 lines (69 loc) · 1.95 KB
/
make.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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
#!/bin/sh
# Script to build thor-scsi-lib.
# Cd to local directory for repository before running script.
home_dir=`pwd`
echo "home_dir =" $home_dir
# Clone repository & submodules - clone by default leaves submodules empty.
if false; then
git clone --recursive https://github.com/jbengtsson/thor-scsi-lib.git
# git submodule update --init --recursive
# git pull --recurse-submodules
fi
# Create the build directory.
if false; then
cd $home_dir
mkdir build
fi
# Make & install the thor-scsi & gtpsa libraries.
if ! false; then
cd $home_dir/build
cmake ..
make -j8
cmake --install . --prefix ../local
fi
# Validate the thor-scsi & gtpsa libraries.
if false; then
cd $home_dir/build
make test
fi
# Create a local Python environment.
if false; then
python3 -m venv $home_dir/venv
# Source vs. "." source only works for bash and not sh.
. $home_dir/venv/bin/activate
# To terminate: deactivate.
fi
# Install required libraries.
if false; then
# Upgrade from pip-24.0 to pip-24.1.
pip install --upgrade pip
# Upgrade: wheel, setuptools, and pip.
pip install wheel setuptools pip --upgrade
pip install pybind11
pip install numpy
pip install scipy
pip install xarray
pip install matplotlib
fi
# Build the Python interfaces.
if ! false; then
export THOR_SCSI_LIB=$home_dir
export gtpsa_PREFIX=$THOR_SCSI_LIB/local
export thor_scsi_PREFIX=$THOR_SCSI_LIB/local
echo "\n\$THOR_SCSI_LIB set to: " $THOR_SCSI_LIB
echo "\$gtpsa_PREFIX set to: " $gtpsa_PREFIX
echo "\$thor_scsi_PREFIX set to: " $thor_scsi_PREFIX
cd $home_dir/src/gtpsa/python
pip install .
cd $home_dir/python
pip install .
fi
# Export path for libraries.
if false; then
# Linux.
echo "export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$home_dir/local/lib" \
>> ~/.bashrc
# Macbook.
# echo "export DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH:$home_dir/local/lib" \
# >> ~/.bashrc
fi