-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathget_data.sh
47 lines (39 loc) · 1.04 KB
/
get_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
39
40
41
42
#!/bin/bash
## Script to download data to recreate results
### Process arguments
while (( "$#" )); do
case "$1" in
-h|--help)
echo "options:"
echo "-h, --help show brief help"
echo "-o, --output-dir=DIR specify a directory to write downloaded data"
exit 0
;;
-o)
shift
if test $# -gt 0; then
OUTPUT=$1
else
echo "no output dir specified"
exit 1
fi
shift
;;
--output-dir*)
export OUTPUT=`echo $1 | sed -e 's/^[^=]*=//g'`
shift
;;
*)
echo "bad option"
exit 1
;;
esac
done
##
PARENT="https://bimsbstatic.mdc-berlin.de/akalin/AAkalin_PanelvsMulti/"
wget -P $OUTPUT $PARENT/"data.tar.gz"
tar -xzf $OUTPUT/"data.tar.gz" -C $OUTPUT
rm $OUTPUT/"data.tar.gz"
wget -P $OUTPUT $PARENT/"results.tgz"
tar -xzvf $OUTPUT/"results.tgz" -C $OUTPUT
rm $OUTPUT/"results.tgz"