安装过程增加错误检查

This commit is contained in:
xuejianqing 2018-10-10 23:54:52 +08:00 committed by joans321
parent a05e222cc4
commit 95ffad8d92

View File

@ -1,20 +1,33 @@
#!/bin/bash #!/bin/bash
function check_result() {
if [ $? -ne 0 ]; then
echo " "
echo "do command failed for $1 !!!"
echo " "
exit 1
fi
}
#Build ctp/lts/ib api #Build ctp/lts/ib api
pushd vnpy/api/ctp pushd vnpy/api/ctp
bash build.sh bash build.sh
check_result "build api.ctp"
popd popd
pushd vnpy/api/lts pushd vnpy/api/lts
bash build.sh bash build.sh
check_result "build api.lts"
popd popd
pushd vnpy/api/xtp pushd vnpy/api/xtp
bash build.sh bash build.sh
check_result "build api.xtp"
popd popd
pushd vnpy/api/ib pushd vnpy/api/ib
bash build.sh bash build.sh
check_result "build api.ib"
popd popd
#Install Python Modules #Install Python Modules