Skip to content

Commit f2f71ce

Browse files
author
Wil Langford
committed
Added shell script to get data files from website.
1 parent e9d87ca commit f2f71ce

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed

get-data-files.sh

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
#!/bin/sh
2+
3+
URL="http://programmingcomputervision.com/downloads/pcv_data.zip"
4+
5+
if /usr/bin/env wget $URL
6+
then
7+
8+
mkdir data-unpack.tmp
9+
cd data-unpack.tmp
10+
11+
unzip -q ../pcv_data.zip
12+
rm -rf __MACOSX
13+
14+
cd ..
15+
16+
if [ -d data/ ]
17+
then
18+
echo Directory 'pcv-data' already exists.
19+
echo Look in the data-unpack.tmp directory for the unzipped data.
20+
else
21+
mv data-unpack.tmp/data .
22+
rmdir data-unpack.tmp
23+
fi
24+
25+
rm pcv_data.zip
26+
else
27+
echo Could not get data archive. Check URL and make sure you have wget.
28+
fi

0 commit comments

Comments
 (0)