Skip to content

Commit

Permalink
Added shell script to get data files from website.
Browse files Browse the repository at this point in the history
  • Loading branch information
Wil Langford committed Jan 28, 2013
1 parent e9d87ca commit f2f71ce
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions get-data-files.sh
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

0 comments on commit f2f71ce

Please sign in to comment.