diff options
author | emkael <emkael@tlen.pl> | 2015-05-05 22:38:13 +0200 |
---|---|---|
committer | emkael <emkael@tlen.pl> | 2015-05-05 22:38:13 +0200 |
commit | 6826ba70039aec1828ca494a54d89c9cd7f7baf8 (patch) | |
tree | 5762db1045f42fbfa5d7e93835487d5b8bb569ad | |
parent | f39588f6aa201af840ce107161c8253491e5a3f5 (diff) |
* code reformat to meet bashate standards
-rwxr-xr-x | fetcher/fetch.sh | 9 | ||||
-rwxr-xr-x | import/00_base_import.sh | 3 |
2 files changed, 4 insertions, 8 deletions
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' diff --git a/import/00_base_import.sh b/import/00_base_import.sh index a5dc396..dffcdb5 100755 --- a/import/00_base_import.sh +++ b/import/00_base_import.sh @@ -1,7 +1,6 @@ #!/bin/bash pushd $(dirname $0) > /dev/null -if [ ! -f ../fetcher/f1db.sql ] -then +if [ ! -f ../fetcher/f1db.sql ]; then ../fetcher/fetch.sh fi < ../fetcher/f1db.sql mysql "$@" |