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