summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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