-
Notifications
You must be signed in to change notification settings - Fork 676
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added shell script to get data files from website.
- Loading branch information
Wil Langford
committed
Jan 28, 2013
1 parent
e9d87ca
commit f2f71ce
Showing
1 changed file
with
28 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
#!/bin/sh | ||
|
||
URL="http://programmingcomputervision.com/downloads/pcv_data.zip" | ||
|
||
if /usr/bin/env wget $URL | ||
then | ||
|
||
mkdir data-unpack.tmp | ||
cd data-unpack.tmp | ||
|
||
unzip -q ../pcv_data.zip | ||
rm -rf __MACOSX | ||
|
||
cd .. | ||
|
||
if [ -d data/ ] | ||
then | ||
echo Directory 'pcv-data' already exists. | ||
echo Look in the data-unpack.tmp directory for the unzipped data. | ||
else | ||
mv data-unpack.tmp/data . | ||
rmdir data-unpack.tmp | ||
fi | ||
|
||
rm pcv_data.zip | ||
else | ||
echo Could not get data archive. Check URL and make sure you have wget. | ||
fi |