-
Notifications
You must be signed in to change notification settings - Fork 8
/
get_data.sh
executable file
·30 lines (25 loc) · 916 Bytes
/
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
#!/usr/bin/env bash
## title :get_data
## description :Script to download and unzip the SPHERE challenge dataset:
## Activity recognition with multimodal sensor data.
## author :Miquel Perello Nieto
## date :20161004
## version :0.1
## usage :get_data.sh
## notes :Downloads and unzips the SPHERE Challenge dataset
## bash_version :GNU bash, version 4.3.11(1)-release (x86_64-pc-linux-gnu)
download_url="http://data.bris.ac.uk/datasets/8gccwpx47rav19vk8x4xapcog/8gccwpx47rav19vk8x4xapcog.zip"
zip_file="${download_url##*/}"
data_folder="public_data"
meta_folder="public_data/metadata"
mkdir -p ${data_folder}
mkdir -p ${meta_folder}
cd ${data_folder}
# Download if local file does not exist
wget --no-clobber ${download_url}
# Unzip in current folder
unzip -j ${zip_file}
rm ${zip_file}
# Unzip all the zip files
unzip \*.zip
rm ./*.zip