diff options
author | Ben Alex | 2015-12-11 14:38:08 +1100 |
---|---|---|
committer | Ben Alex | 2015-12-11 14:46:11 +1100 |
commit | 77d83c19c02e0a1aa01406b0c448930aa89b9d10 (patch) | |
tree | 1385be0be7830bb2c72692276237ca55f036ab14 /tws_get_version | |
parent | e4253f940650d667bb306d6a7f07a647fa6ef904 (diff) | |
download | aur-77d83c19c02e0a1aa01406b0c448930aa89b9d10.tar.gz |
Changes to support IB TWS's 954.2o release, which now runs TWS
automatically follows an unattended install.
Diffstat (limited to 'tws_get_version')
-rwxr-xr-x | tws_get_version | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/tws_get_version b/tws_get_version index 1aa333ba019f..e85348a40f5f 100755 --- a/tws_get_version +++ b/tws_get_version @@ -20,15 +20,27 @@ cd "${TDIR}" || exit 1 rm -rf $HOME/.install4j $HOME/.i4j_jres $HOME/Jts chmod +x ${ARG1} + +# as of 954.2o the installer runs TWS, even after unattended install! +# so we need to install, wait to kill off the nuisance process, and continue ${ARG1} -q &> /dev/null -MAJORVER=$(ls -1 $HOME/Jts) +while true +do + pkill -f $HOME/Jts + if [ $? -eq 0 ]; then + break + fi +done + + +MAJORVER=`find $HOME/Jts -maxdepth 1 -type d -regex '.*/[0-9]*' -printf '%f'` TWS_HOME="${TDIR}/twshome" mkdir "${TWS_HOME}" || exit 1 LOG_FIFO="${TDIR}/twslogpipe" mkfifo "${LOG_FIFO}" || exit 1 -TWS_CP="${HOME}/Jts/${MAJORVER}/jars/*" +TWS_CP="${HOME}/Jts/${MAJORVER}/jars/jts.jar:${HOME}/Jts/${MAJORVER}/jars/total.jar" java -cp "${TWS_CP}" jclient.LoginFrame "${TWS_HOME}" &>"${LOG_FIFO}" & disown TWS_PID="$!" |