From e455081c2780505db2ed601271ba6ffe5e170d1e Mon Sep 17 00:00:00 2001 From: LeoK Date: Wed, 7 Nov 2018 18:18:04 +0800 Subject: [PATCH 1/2] Update install.sh Added user options --- install.sh | 45 +++++++++++++++++++++++++++++++++------------ 1 file changed, 33 insertions(+), 12 deletions(-) diff --git a/install.sh b/install.sh index 27fd9235..da90c17b 100755 --- a/install.sh +++ b/install.sh @@ -1,21 +1,42 @@ #!/bin/bash #Build ctp/lts/ib api -pushd vnpy/api/ctp -bash build.sh -popd -pushd vnpy/api/lts -bash build.sh -popd +echo "是否要安装'CTP'接口? (Do you want to install 'CTP'?)" +read -p "Enter [y]n: " var1 +var1=${var1:-y} +if [ "$var1" = "y" ]; then + pushd vnpy/api/ctp + bash build.sh + popd +fi -pushd vnpy/api/xtp -bash build.sh -popd +echo "是否要安装'LTS'接口? (Do you want to install 'LTS'?)" +read -p "Enter [y]n: " var1 +var1=${var1:-y} +if [ "$var1" = "y" ]; then + pushd vnpy/api/lts + bash build.sh + popd +fi -pushd vnpy/api/ib -bash build.sh -popd +echo "是否要安装'XTP'接口? (Do you want to install 'XTP'?)" +read -p "Enter [y]n: " var1 +var1=${var1:-y} +if [ "$var1" = "y" ]; then + pushd vnpy/api/xtp + bash build.sh + popd +fi + +echo "是否要安装'IB'接口? (Do you want to install 'IB'?)" +read -p "Enter [y]n: " var1 +var1=${var1:-y} +if [ "$var1" = "y" ]; then + pushd vnpy/api/ib + bash build.sh + popd +fi #Install Python Modules pip install -r requirements.txt From f143849ac58bd98a356194fdb2ca20fc55a19d04 Mon Sep 17 00:00:00 2001 From: LeoK Date: Wed, 7 Nov 2018 18:29:13 +0800 Subject: [PATCH 2/2] Update install.sh changed English questions --- install.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/install.sh b/install.sh index da90c17b..33a4263c 100755 --- a/install.sh +++ b/install.sh @@ -2,7 +2,7 @@ #Build ctp/lts/ib api -echo "是否要安装'CTP'接口? (Do you want to install 'CTP'?)" +echo "是否要安装'CTP'接口? (Do you need 'CTP' interface?)" read -p "Enter [y]n: " var1 var1=${var1:-y} if [ "$var1" = "y" ]; then @@ -11,7 +11,7 @@ if [ "$var1" = "y" ]; then popd fi -echo "是否要安装'LTS'接口? (Do you want to install 'LTS'?)" +echo "是否要安装'LTS'接口? (Do you need 'LTS' interface?)" read -p "Enter [y]n: " var1 var1=${var1:-y} if [ "$var1" = "y" ]; then @@ -20,7 +20,7 @@ if [ "$var1" = "y" ]; then popd fi -echo "是否要安装'XTP'接口? (Do you want to install 'XTP'?)" +echo "是否要安装'XTP'接口? (Do you need 'XTP' interface?)" read -p "Enter [y]n: " var1 var1=${var1:-y} if [ "$var1" = "y" ]; then @@ -29,7 +29,7 @@ if [ "$var1" = "y" ]; then popd fi -echo "是否要安装'IB'接口? (Do you want to install 'IB'?)" +echo "是否要安装'IB'接口? (Do you need 'IB' interface?)" read -p "Enter [y]n: " var1 var1=${var1:-y} if [ "$var1" = "y" ]; then