diff options
-rwxr-xr-x | .tools/contributors.sh | 2 | ||||
-rwxr-xr-x | .tools/deploy.sh | 3 | ||||
-rwxr-xr-x | .tools/init.sh | 10 | ||||
-rwxr-xr-x | .tools/testxml.sh | 1 |
4 files changed, 16 insertions, 0 deletions
diff --git a/.tools/contributors.sh b/.tools/contributors.sh index 313cf905..2fa95fff 100755 --- a/.tools/contributors.sh +++ b/.tools/contributors.sh @@ -11,6 +11,8 @@ gitclone https://gitlab.com/evol/evol-tools.git tools cd tools/contrib_xsl make about-server +check_error + cd ../../clientdata export RES=$(git diff) diff --git a/.tools/deploy.sh b/.tools/deploy.sh index 786062ca..b5449f6e 100755 --- a/.tools/deploy.sh +++ b/.tools/deploy.sh @@ -20,11 +20,14 @@ gitclone https://gitlab.com/evol/evol-music.git music cd tools/update ./createnew.sh +check_error ./create_music.sh +check_error cp -r upload/* ../../clientdata/public cd ../../clientdata gitclone https://gitlab.com/4144/pagesindexgen.git pagesindexgen cd pagesindexgen ./pagesindexgen.py ../public +check_error ls ../public 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 } diff --git a/.tools/testxml.sh b/.tools/testxml.sh index 2b8b20d8..c56dbd6f 100755 --- a/.tools/testxml.sh +++ b/.tools/testxml.sh @@ -11,6 +11,7 @@ gitclone https://gitlab.com/evol/evol-tools.git tools cd tools/testxml ./xsdcheck.sh +check_error export RES=$(cat errors.txt) if [[ -n "${RES}" ]]; then echo "xml check failed" >../../clientdata/shared/error.log |