aboutsummaryrefslogtreecommitdiffstats
path: root/typora-bin/typora.sh
diff options
context:
space:
mode:
authorDanilo M. <danix@danix.xyz>2026-08-08 21:34:56 +0200
committerDanilo M. <danix@danix.xyz>2026-08-08 21:34:56 +0200
commit4e34c235cd982baa2b8f8e01d081f3d148050cba (patch)
tree107ff167428e28d853a2614fff14c244654cf00c /typora-bin/typora.sh
parentf67bcd793194789ab78452f9d4f3133ce2517ee1 (diff)
downloadmy-slackbuilds-4e34c235cd982baa2b8f8e01d081f3d148050cba.tar.gz
my-slackbuilds-4e34c235cd982baa2b8f8e01d081f3d148050cba.zip
typora-bin: install to a versioned /opt directory
Was /opt/Typora-linux-x64 (upstream's own unversioned name), now /opt/typora-bin-$VERSION, matching kitty-bin and the rest of the repo. Upgrades can no longer leave a previous release's files behind. The versioned path is now generated rather than written down twice: the wrapper ships an @APPDIR@ placeholder that the SlackBuild substitutes, and the chrome-sandbox setuid line is appended to doinst.sh at build time. Both would otherwise be stale-version traps on the next bump, the doinst.sh one silently costing the sandbox its setuid bit. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Diffstat (limited to 'typora-bin/typora.sh')
-rw-r--r--typora-bin/typora.sh4
1 files changed, 3 insertions, 1 deletions
diff --git a/typora-bin/typora.sh b/typora-bin/typora.sh
index 9ecdf48..4f56585 100644
--- a/typora-bin/typora.sh
+++ b/typora-bin/typora.sh
@@ -8,7 +8,9 @@
#
# Override either way with TYPORA_OZONE=wayland or TYPORA_OZONE=x11.
-APPDIR=/opt/Typora-linux-x64
+# @APPDIR@ is substituted by the SlackBuild at build time (it carries the
+# package version, so it must not be hardcoded here).
+APPDIR=@APPDIR@
ozone=${TYPORA_OZONE:-auto}
if [ "$ozone" = auto ]; then