-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy path01_get_repositories.sh
executable file
·62 lines (46 loc) · 1.11 KB
/
01_get_repositories.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
#!/bin/bash
# Get Variables
source 00_compilations_parameters.sh
# First get specfem3d_globe repository
if [ ! -d $SPECFEM_DIR ]; then
git clone $SPECFEM_LINK
cd specfem3d_globe
git checkout -b $SPECFEM_BRANCH origin/$SPECFEM_BRANCH
cd $CURRENT_DIR
fi
# Create Package Folder if it doesn't exist
if [ ! -d $PACKAGES ]; then
# Create package dir
mkdir -p $PACKAGES
fi
# Download ADIOS if it doesnt exist
if [ ! -d $ADIOS_DIR ]; then
if [ $ADIOS_VERSION == "1" ]
then
cd $PACKAGES
mkdir adios
# Get ADIOS
wget --no-check-certificate -O adios.tar.gz $ADIOS_LINK
tar -xzvf adios.tar.gz --strip-components=1 -C $ADIOS_DIR
else
cd $PACKAGES
git clone $ADIOS_LINK $ADIOS_DIR
fi
cd $ROOT_DIR
fi
# Download HDF5 if it doesn't exist
if [ ! -d $HDF5_DIR ]; then
cd $PACKAGES
mkdir hdf5
# Get HDF5
wget -O hdf5.tar.gz $HDF5_LINK
tar -xzvf hdf5.tar.gz --strip-components=1 -C $HDF5_DIR
cd $ROOT_DIR
fi
# Download ASDF
if [ ! -d $ASDF_DIR ]; then
cd $PACKAGES
# Get ASDF
git clone $ASDF_LINK
cd $ROOT_DIR
fi