summarylogtreecommitdiffstats
diff options
context:
space:
mode:
author0b1001002021-12-29 11:16:15 +0100
committer0b1001002021-12-29 11:34:18 +0100
commit17fb07a8464ff6e1f8aa646319252e2139a77400 (patch)
treec460d29c380f5451202e6344c4c7261307d83ac4
parent045cc3c1c70a27c099de271756cf08594c1dedef (diff)
downloadaur-17fb07a8464ff6e1f8aa646319252e2139a77400.tar.gz
Make patches independent and more adaptable to future changes
-rw-r--r--PKGBUILD12
1 files changed, 8 insertions, 4 deletions
diff --git a/PKGBUILD b/PKGBUILD
index 6cbe1c43f2b8..93450e221171 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -24,13 +24,17 @@ sha512sums=('22e2323e71396dc38d94142ef6235b1002fec094ab00fbdc5dae59fd5863c5692ab
prepare() {
cd "HELI-X${pkgver%%.*}"
+ local s="[[:space:]]"
- # Use installed java runtime
+ # Use an installed java runtime engine instead of the provided one
rm -rf Java
- sed -i 's|^./Java/jre11/bin/java|java|' runHELI-X.sh runHELI-X-Server.sh
+ sed -i "s|./Java/jre11/bin/java|java|" runHELI-X.sh runHELI-X-Server.sh
- # Use a local writable config directory in the home folder
- sed -i '/^java\ /{s|\(.*\)\ |\1\ -DheliX.path.home=\"\$HOME/.heli-x\"\ |}' runHELI-X.sh runHELI-X-Server.sh
+ # Use a local writable home path for config files and resources
+ sed -i \
+ -e "/java$s*-/{s/$s*$//}" \
+ -e "/java$s*-/{s|\(.*\)$s|\1 -DheliX.path.home=\"\$HOME/.heli-x\" |}" \
+ runHELI-X.sh runHELI-X-Server.sh
}
package() {