forked from Nek5000/nekRS
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmktar
executable file
·100 lines (80 loc) · 1.88 KB
/
mktar
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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
#!/bin/bash
set -x
function tar_3rd_party() {
cleanup=$1
clone_hypre
if [ $cleanup -eq 1 ]; then
tar --exclude=hypre/.git -cvzf hypre.tgz hypre/
else
tar -cvzf hypre.tgz hypre/
fi
if [ $? -ne 0 ]; then
echo "Failed to creare a .tar out of hypre."
exit 1
fi
mv hypre.tgz ../3rd_party/
clone_nek
clone_gslib
clone_parrsb
if [ $cleanup -eq 1 ]; then
tar --exclude=nek5000/.git -cvzf nek5000.tgz nek5000/
else
tar -cvzf nek5000.tgz nek5000/
fi
if [ $? -ne 0 ]; then
echo "Failed to creare a .tar out of nek5000."
exit 1
fi
mv nek5000.tgz ../3rd_party/
clone_occa
if [ $cleanup -eq 1 ]; then
tar --exclude=occa/.git -cvzf occa.tgz occa/
else
tar -cvzf occa.tgz occa/
fi
if [ $? -ne 0 ]; then
echo "Failed to creare a .tar out of occa."
exit 1
fi
mv occa.tgz ../3rd_party/
clone_libp
if [ $cleanup -eq 1 ]; then
rm -rf libparanumal/nodes/tet*
rm -rf libparanumal/nodes/tri*
rm -rf libparanumal/meshes
rm -rf libparanumal/benchmarks
tar --exclude=libparanumal/.git -cvzf libparanumal.tgz libparanumal/
else
tar -cvzf libparanumal.tgz libparanumal/
fi
if [ $? -ne 0 ]; then
echo "Failed to creare a .tar out of libparanumal."
exit 1
fi
mv libparanumal.tgz ../3rd_party/
}
function tar_nekrs() {
mkdir nekRS
cp -r ../3rd_party ../scripts ../CMake*.txt ../examples \
../install_*.cmake ../LICENSE ../make* ../README* ../RELEASE* ../src nekRS
tar --exclude=.git -cvzf nekrs.tar.gz nekRS
if [ $? -ne 0 ]; then
echo "Failed to creare a .tar out of nekrs."
exit 1
fi
mv nekrs.tar.gz ../
cd ..
rm -rf 3rd_party/*.tgz
rm -rf .package
}
NEKRS_SRC_THIRD_PARTY_DIR=`pwd`/3rd_party
. ./3rd_party/3rd_party.version
# Exit if being sourced
$(return >/dev/null 2>&1)
if [ $? -eq 0 ]; then
return 0
fi
mkdir -p .package
cd .package
tar_3rd_party 1
tar_nekrs