From 6826ba70039aec1828ca494a54d89c9cd7f7baf8 Mon Sep 17 00:00:00 2001 From: emkael Date: Tue, 5 May 2015 22:38:13 +0200 Subject: * code reformat to meet bashate standards --- fetcher/fetch.sh | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'fetcher') diff --git a/fetcher/fetch.sh b/fetcher/fetch.sh index ae18eeb..e083ee5 100755 --- a/fetcher/fetch.sh +++ b/fetcher/fetch.sh @@ -1,10 +1,8 @@ #!/bin/bash pushd $(dirname $0) > /dev/null wget -N http://ergast.com/downloads/f1db.sql.gz -q -if [[ $? != 0 ]] -then - if [[ -f f1db.sql.gz ]] - then +if [[ $? != 0 ]]; then + if [[ -f f1db.sql.gz ]]; then echo "Warning: could not fetch new DB, using archived version" else echo "Error: could not fetch DB" @@ -12,8 +10,7 @@ then exit 1 fi fi -if [[ f1db.sql.gz -nt f1db.sql ]] -then +if [[ f1db.sql.gz -nt f1db.sql ]]; then echo "Found new ErgastDB version" zcat f1db.sql.gz | sed 's/ ENGINE=MyISAM//' > f1db.sql find -name f1db.sql.gz -printf '%f: %Td-%Tm-%TY %TH:%TM, %s bytes\n' -- cgit v1.2.3