-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathGet_LSDTT_example_data.sh
38 lines (31 loc) · 1.24 KB
/
Get_LSDTT_example_data.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
#!/bin/bash
# This is a startup script for LSDTopoTools
# It grabs and unpacks the example data
# it then builds the code from there.
# Author: SMM
# Date: 24/06/2019
# clone or pull the repo, depending on what is in there
# check if the files have been cloned
if [ -f /LSDTopoTools/data/ExampleTopoDatasets/README.asc ]
then
echo "You appear to have already downloaded the example datasets."
echo "If you wish to download a newer version you should delete the ExampleTopoDatasets directory,"
echo "And then run this script again"
else
echo "\n\n========================================"
echo "I am grabbing the example datasets from the web"
echo "These files are large (>150Mb)! It will take a little while to download."
echo "========================================\n\n"
if [ -d /LSDTopoTools/data/ ]
then
echo "You have the data directory"
else
mkdir /LSDTopoTools/data/
fi
cd /LSDTopoTools/data/
wget https://github.com/LSDtopotools/ExampleTopoDatasets/archive/master.zip
unzip master.zip -d /LSDTopoTools/data/
mv /LSDTopoTools/data/ExampleTopoDatasets-master /LSDTopoTools/data/ExampleTopoDatasets
# Clean up
rm master.zip
fi