-
-
Save joyrexus/0d305d2da1102e45defe to your computer and use it in GitHub Desktop.
#ldp | Shell script to download and build the LDP dataset (sqlite database).
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
#!/usr/sh | |
DB="ldp.db" | |
SERVER="joyrexus.spc.uchicago.edu" | |
URL="http://$SERVER/LDP/data/db/latest/ldp.sql.gz" | |
if [ -e $DB ] | |
then | |
mv -f $DB $DB.bk | |
fi | |
echo "starting build of $DB" | |
echo "... retrieving data from $SERVER" | |
echo "... this may take a few minutes" | |
curl $URL | gunzip -c | sqlite3 $DB | |
if [ -e $DB ] | |
then | |
echo "$DB built!" | |
else | |
echo "sorry, build of $DB failed" | |
echo "check your network connection" | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment