diff options
author | Andrei Karas <akaras@inbox.ru> | 2016-04-25 18:17:35 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2016-04-25 18:17:35 +0300 |
commit | 1d64dcc47323ca474d300b3888f05625760cd519 (patch) | |
tree | 6c61dfdcf980730cf3325d88d235caf77eebde8e /.tools/init.sh | |
parent | 8b1c82f07ed3bbb53e6e5307d11c634649d886f8 (diff) | |
download | clientdata-1d64dcc47323ca474d300b3888f05625760cd519.tar.gz clientdata-1d64dcc47323ca474d300b3888f05625760cd519.tar.bz2 clientdata-1d64dcc47323ca474d300b3888f05625760cd519.tar.xz clientdata-1d64dcc47323ca474d300b3888f05625760cd519.zip |
Check for error after most ci scripts.
Diffstat (limited to '.tools/init.sh')
-rwxr-xr-x | .tools/init.sh | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/.tools/init.sh b/.tools/init.sh index e1073e02..a2bda610 100755 --- a/.tools/init.sh +++ b/.tools/init.sh @@ -1,5 +1,11 @@ #!/bin/bash +function check_error { + if [ "$1" != 0 ]; then + exit $result + fi +} + function gitclone { git clone $* if [ "$?" != 0 ]; then @@ -10,6 +16,7 @@ function gitclone { git clone $* fi fi + check_error } function aptget_update { @@ -22,6 +29,7 @@ function aptget_update { apt-get update fi fi + check_error } function aptget_install { @@ -34,10 +42,12 @@ function aptget_install { apt-get -y -qq install $* fi fi + check_error } function clientdata_init { mkdir shared cd .. ln -s clientdata client-data + check_error } |