summaryrefslogtreecommitdiff
path: root/doit.sh
diff options
context:
space:
mode:
Diffstat (limited to 'doit.sh')
-rwxr-xr-xdoit.sh9
1 files changed, 5 insertions, 4 deletions
diff --git a/doit.sh b/doit.sh
index e03fb45..1e2fbe6 100755
--- a/doit.sh
+++ b/doit.sh
@@ -6,13 +6,14 @@ else
command="perl -I/home/dakkar/src/WebCoso/lib/ /home/dakkar/src/WebCoso/script/webcoso.pl"
fi
-$command -s src/ -d output -I templates/ "$@"
+if ! $command -s src/ -d output -I templates/ "$@"; then
+ echo "Something wrong: $!" >&2
+ exit 1
+fi
-if [[ $! -eq 0 && -z "$*" ]]; then
+if [[ "$*" != '--clean' ]]; then
rsync -r output/ /var/www/localhost/htdocs/
rsync -r additions/ /var/www/localhost/htdocs/
-else
- echo "Something wrong: $!" >&2
fi