Improve daily.sh robustness

This commit is contained in:
Job Snijders
2015-07-25 18:13:50 +02:00
parent 65abf8bd7a
commit 0e473d2538

View File

@@ -1,10 +1,12 @@
#!/bin/bash
#!/usr/bin/env bash
cd $(dirname $0) || exit 1
set -eu
if [ $(php daily.php -f update) -eq 1 ]; then
git pull --quiet
php includes/sql-schema/update.php
cd "$(dirname "$0")"
if [ "$(php daily.php -f update)" -eq 1 ]; then
git pull --quiet
php includes/sql-schema/update.php
fi
php daily.php -f syslog