forked from cpmech/gosl
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathall.bash
More file actions
executable file
·65 lines (54 loc) · 1.27 KB
/
all.bash
File metadata and controls
executable file
·65 lines (54 loc) · 1.27 KB
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
#!/bin/bash
set -e
platform='unknown'
unamestr=`uname`
if [[ "$unamestr" == 'Linux' ]]; then
platform='linux'
elif [[ "$unamestr" == 'MINGW32_NT-6.2' ]]; then
platform='windows'
elif [[ "$unamestr" == 'MINGW64_NT-10.0' ]]; then
platform='windows'
elif [[ "$unamestr" == 'Darwin' ]]; then
platform='darwin'
fi
echo "platform = $platform"
install_and_test(){
HERE=`pwd`
PKG=$1
DOTEST=$2
HASGENBASH=$3
echo
echo
echo "=== compiling $PKG ============================================================="
cd $PKG
if [[ ! -z $HASGENBASH ]]; then
./xgenflagsfile.bash
fi
touch *.go
go install
if [ "$DOTEST" -eq 1 ]; then
go test
fi
cd $HERE
}
for p in chk io utl plt; do
install_and_test $p 1
done
if [[ $platform == 'linux' ]]; then
install_and_test mpi 1
else
install_and_test mpi 0
fi
for p in la/oblas la fun/dbf fun/fftw fun num/qpck num gm/rw gm/tri gm/msh gm graph opt ode; do
install_and_test $p 1
done
if [[ $platform != 'windows' ]]; then
install_and_test rnd/sfmt 1
install_and_test rnd/dsfmt 1
fi
install_and_test rnd 1
#if [[ $platform == 'linux' ]]; then
# install_and_test vtk 0 1
#fi
echo
echo "=== SUCCESS! ============================================================"