summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordakkar <dakkar@thenautilus.net>2009-08-19 13:49:58 +0200
committerdakkar <dakkar@thenautilus.net>2009-08-19 13:49:58 +0200
commit8e6fe7d945f1effaf6b87f8b5ed18b425a93508c (patch)
tree57e65ebce55cac53bdeb11536686ecc9be885e2d
parentlang chooser (diff)
downloadthenautilus-8e6fe7d945f1effaf6b87f8b5ed18b425a93508c.tar.gz
thenautilus-8e6fe7d945f1effaf6b87f8b5ed18b425a93508c.tar.bz2
thenautilus-8e6fe7d945f1effaf6b87f8b5ed18b425a93508c.zip
better error handling
-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