From 4f331cc9cf7cfe63c28194c7c4229429569c5099 Mon Sep 17 00:00:00 2001 From: "Danilo M." Date: Tue, 13 Oct 2026 14:19:31 +0200 Subject: opencode2-bin: isolate config/state with a launcher wrapper Install the real binary as /usr/libexec/opencode2/opencode and make /usr/bin/opencode2 a wrapper that points XDG_CONFIG_HOME and XDG_DATA_HOME at opencode2-specific directories, so 2.0 does not touch the v1 opencode package's config, auth or state. --- opencode2-bin/opencode2-bin.SlackBuild | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'opencode2-bin/opencode2-bin.SlackBuild') diff --git a/opencode2-bin/opencode2-bin.SlackBuild b/opencode2-bin/opencode2-bin.SlackBuild index 53b65f6..1dd27f1 100644 --- a/opencode2-bin/opencode2-bin.SlackBuild +++ b/opencode2-bin/opencode2-bin.SlackBuild @@ -67,7 +67,12 @@ find -L . \ # commands; this package ships it as `opencode2` so it can coexist with the # v1 `opencode-bin` package. No stripping: the binary is bun-generated and # stripping renders it unusable. -install -D -m 0755 package/bin/opencode $PKG/usr/bin/opencode2 +# +# The real binary goes under /usr/libexec and /usr/bin/opencode2 is a small +# wrapper that points XDG_CONFIG_HOME/XDG_DATA_HOME at opencode2-specific +# directories, keeping its config and state out of the v1 opencode folders. +install -D -m 0755 package/bin/opencode $PKG/usr/libexec/opencode2/opencode +install -D -m 0755 $CWD/opencode2 $PKG/usr/bin/opencode2 mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION cat $CWD/README > $PKG/usr/doc/$PRGNAM-$VERSION/README -- cgit v1.2.3