-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathsroie2019.sh
35 lines (29 loc) · 859 Bytes
/
sroie2019.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
#!/bin/bash
start=$(date +%s)
# If you do not provide the directory then by default it is the ~/SROIE20219 directory
if [ -z "$1" ]; then
# navigate to ~/data
echo "Navigating to ~/SROIE2019/ ..."
mkdir -p ~/SROIE2019
# shellcheck disable=SC2164
cd ~/SROIE2019/
# check if is valid directory
elif [ ! -d "$1" ]; then
# shellcheck disable=SC2086
echo $1 "is not a valid directory"
exit 0
else
echo "Navigating to" "$1" "..."
cd "$1" || exit
fi
echo "Downloading the scanned receipt dataset..."
curl -L "https://github.com/BlackStar1313/ICDAR-2019-RRC-SROIE/releases/download/v2.0/SROIE2019.zip" -o SROIE2019.zip
echo "Done downloading."
# Extract data
echo "Extracting the dataset..."
unzip SROIE2019.zip
echo "removing the zip file..."
rm SROIE2019.zip
end=$(date +%s)
runtime=$((end - start))
echo "Completed in" $runtime "seconds"