Use $() consistently; fail if dirname or cd fails

This commit is contained in:
Paul Gear
2014-10-25 08:41:53 +10:00
parent 70bb420fe7
commit 1a5544116f

View File

@@ -1,7 +1,6 @@
#!/bin/bash
dir=`dirname $0`
cd $dir;
cd $(dirname $0) || exit 1
if [ $(php daily.php -f update) -eq 1 ]; then
git pull --no-edit --quiet