aboutsummarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorBen Alex2023-07-15 14:01:14 +1000
committerBen Alex2023-07-15 14:01:14 +1000
commit63de3311b8215b7b321a18be3d98ca52d422119d (patch)
tree7066907e1e3dfb5411588862f711beb5f8c974c6
parent3da44e02f2665986fe770274d17b797f4647ba24 (diff)
downloadaur-63de3311b8215b7b321a18be3d98ca52d422119d.tar.gz
Update to 10.23.2b and refactor Java locating
-rw-r--r--.SRCINFO8
-rw-r--r--PKGBUILD38
2 files changed, 27 insertions, 19 deletions
diff --git a/.SRCINFO b/.SRCINFO
index d2fef7b5bba6..9dc3f370169b 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,12 +1,14 @@
pkgbase = ib-tws
pkgdesc = Electronic trading platform from discount brokerage firm Interactive Brokers
- pkgver = 10.23.2a
+ pkgver = 10.23.2b
pkgrel = 1
epoch = 1
url = http://interactivebrokers.com/
arch = any
license = custom
makedepends = libarchive
+ makedepends = findutils
+ makedepends = sed
depends = gtk2
depends = ttf-liberation
optdepends = ffmpeg-compat-55
@@ -19,7 +21,7 @@ pkgbase = ib-tws
source = ib-gw
source = ib-gw.conf
source = ib-gw.desktop
- source = tws-10.23.2a-standalone-linux-x64.sh::https://download2.interactivebrokers.com/installers/tws/latest-standalone/tws-latest-standalone-linux-x64.sh
+ source = tws-10.23.2b-standalone-linux-x64.sh::https://download2.interactivebrokers.com/installers/tws/latest-standalone/tws-latest-standalone-linux-x64.sh
sha256sums = 4b65b33dc88d77fef6e7ba1bdc1ae88b149296d3e1eb87db251bfcdf119a1f22
sha256sums = e23256d8948a2a1adf7d69d99909738888b7d8a0adbd81578543312f1f509f66
sha256sums = b359c8b5ccc7d884316ba9c88395450ff3a5dfd6af376741f091f837a5db7c26
@@ -27,6 +29,6 @@ pkgbase = ib-tws
sha256sums = 62fbd49b8c7fb5d4ae7491ca2b9072d42bbe589a2b9f0e14d09d1bf1177a3c46
sha256sums = 21070fa89c9053dff06ba799b6f9838bfd5ff209fd8dd710c5a97c3fc684af44
sha256sums = 9f74a204c45d47f551861cb231de89f2536f9966942da41f95d8f0ce5bcd13a4
- sha256sums = 69397b59dd5e94eee687c90ebc397e260fa62323b0a2284a1765e2976ea2bc37
+ sha256sums = d5184531331669cef3bb7c5a36fb328a056f8cf130ecd2e76a7b2b2d860c7c4d
pkgname = ib-tws
diff --git a/PKGBUILD b/PKGBUILD
index 3b370254fb54..6d2df9ab8f27 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -3,7 +3,7 @@
# Contributor: bgh <aur at bgh dot io>
pkgname=ib-tws
-pkgver=10.23.2a
+pkgver=10.23.2b
pkgrel=1
epoch=1
pkgdesc='Electronic trading platform from discount brokerage firm Interactive Brokers'
@@ -13,7 +13,7 @@ license=('custom')
backup=('etc/ib-tws.conf' 'etc/ib-gw.conf')
depends=(gtk2 ttf-liberation)
optdepends=(ffmpeg-compat-55)
-makedepends=(libarchive)
+makedepends=(libarchive findutils sed)
source=('LICENSE'
'ib-tws'
@@ -30,7 +30,7 @@ sha256sums=('4b65b33dc88d77fef6e7ba1bdc1ae88b149296d3e1eb87db251bfcdf119a1f22'
'62fbd49b8c7fb5d4ae7491ca2b9072d42bbe589a2b9f0e14d09d1bf1177a3c46'
'21070fa89c9053dff06ba799b6f9838bfd5ff209fd8dd710c5a97c3fc684af44'
'9f74a204c45d47f551861cb231de89f2536f9966942da41f95d8f0ce5bcd13a4'
- '69397b59dd5e94eee687c90ebc397e260fa62323b0a2284a1765e2976ea2bc37')
+ 'd5184531331669cef3bb7c5a36fb328a056f8cf130ecd2e76a7b2b2d860c7c4d')
build() {
cd ${srcdir}
@@ -40,23 +40,29 @@ build() {
chmod +x tws-${pkgver}-standalone-linux-x64.sh
./tws-${pkgver}-standalone-linux-x64.sh -q -dir ${srcdir}/target
- # install4j provides a "shared" JRE that may go into /opt, /usr/local or $HOME/.i4j_jres/.
- # If it already exists, the install4j log will include a "java.home=" truncated path.
- BUNDLED_JRE_LOCATION=$(grep java.home ${srcdir}/target/.install4j/installation.log | head -n 1 | cut -d '=' -f 2 | sed 's/\.\.\.//g')
- if [ -z "${BUNDLED_JRE_LOCATION}" ]; then
- echo "java.home JRE location could not be found in the log"
- exit 1
- fi
- BUNDLED_JRE_LOCATION=$(echo ${BUNDLED_JRE_LOCATION}*/*)
- echo "java.home JRE location expanded to ${BUNDLED_JRE_LOCATION}"
-
- if [ ! -f "${BUNDLED_JRE_LOCATION}/bin/java" ]; then
- echo "java.home JRE location did not contain java; finding log entry which installed java"
+ echo "Attempting to locate the Install4J-compatible Java installation"
+ if grep -q -e "Install file.*/java;" ${srcdir}/target/.install4j/installation.log; then
+ echo "Installer script indicates Java was installed by Install4j; finding log entry for full path"
BUNDLED_JRE_LOCATION=$(grep -e "Install file.*/java;" ${srcdir}/target/.install4j/installation.log | head -n 1 | cut -d ';' -f 1|sed -e 's/ .*Install file\: //g'|sed 's/\/bin\/java//')
if [ -z "${BUNDLED_JRE_LOCATION}" ]; then
- echo "Could not find bundled JRE installation entry in log"
+ echo "Could not find bundled JRE installation entry in Install4J log; unable to proceed"
+ exit 1
+ fi
+ echo "Java installed by Install4J at ${BUNDLED_JRE_LOCATION}"
+ else
+ echo "Install4J log did not install Java; attempting to locate a previour Java installation it re-used"
+ LOG_JRE_LOCATION=$(grep java.home ${srcdir}/target/.install4j/installation.log | head -n 1 | cut -d '=' -f 2 | sed 's/\.\.\.//g')
+ if [ -z "${LOG_JRE_LOCATION}" ]; then
+ echo "Install4J log did not provide a java.home; unable to proceed"
exit 1
fi
+ echo "Previous Install4J-installed Java reported in log as ${LOG_JRE_LOCATION}"
+ CANONICALIZED_JRE_LOCATION=$(echo ${LOG_JRE_LOCATION}*)
+ echo "Canonicalized path resolved to ${CANONICALIZED_JRE_LOCATION}"
+ FIND_OUTPUT=$(find ${CANONICALIZED_JRE_LOCATION} -path '*/bin/java' | head -n 1)
+ echo "Search for Java result: $FIND_OUTPUT"
+ BUNDLED_JRE_LOCATION=$(echo ${FIND_OUTPUT} | sed 's/\(.*\)\/bin\/java/\1/')
+ echo "Final Java installation directory resolved to ${BUNDLED_JRE_LOCATION}"
fi
if [ -f "${BUNDLED_JRE_LOCATION}/bin/java" ]; then
echo "Confirmed java in ${BUNDLED_JRE_LOCATION}"