summaryrefslogtreecommitdiff
path: root/fetcher
diff options
context:
space:
mode:
authoremkael <emkael@tlen.pl>2015-02-17 16:45:05 +0100
committeremkael <emkael@tlen.pl>2015-02-17 16:45:05 +0100
commit6c203d33de45dc7f0926d59749dabcd94f888947 (patch)
treeb4913ed9be40a1518318be014598efff4d68324f /fetcher
* fetcher utility
Diffstat (limited to 'fetcher')
-rw-r--r--fetcher/.gitignore1
-rwxr-xr-xfetcher/fetch.sh9
2 files changed, 10 insertions, 0 deletions
diff --git a/fetcher/.gitignore b/fetcher/.gitignore
new file mode 100644
index 0000000..8ee64a3
--- /dev/null
+++ b/fetcher/.gitignore
@@ -0,0 +1 @@
+f1db.sql*
diff --git a/fetcher/fetch.sh b/fetcher/fetch.sh
new file mode 100755
index 0000000..259cfc3
--- /dev/null
+++ b/fetcher/fetch.sh
@@ -0,0 +1,9 @@
+#!/bin/bash
+pushd $(dirname $0) > /dev/null
+wget -N http://ergast.com/downloads/f1db.sql.gz -q
+if [[ f1db.sql.gz -nt f1db.sql ]]
+then
+ echo "New ErgastDB version fetched"
+ zcat f1db.sql.gz | sed 's/ ENGINE=MyISAM//' > f1db.sql
+fi
+popd > /dev/null