Replace the /usr/bin/grok-bot (and sand) plain symlink with a launch shim that checks the latest Gitea release, pacman -U's a newer .pkg.tar.zst when available, then execs the real binary under /opt/Grok Bot/. Skip with GROK_BOT_NO_UPDATE=1; fail soft on network/API errors. Bump pkgrel for the packaging change. #2
This commit is contained in:
@@ -10,7 +10,7 @@
|
||||
pkgname=grok-bot-bin
|
||||
pkgver=0.30.0
|
||||
_commit=2385d097738b3719cc5ecd9281a107aa106215f1
|
||||
pkgrel=1
|
||||
pkgrel=2
|
||||
pkgdesc="Grok Bot desktop agent (official .deb repackaged)"
|
||||
arch=('x86_64')
|
||||
url="https://cursor.com/download/bot"
|
||||
@@ -31,30 +31,30 @@ depends=(
|
||||
)
|
||||
optdepends=(
|
||||
'libappindicator-gtk3: tray icon support'
|
||||
'curl: auto-update check on launch'
|
||||
)
|
||||
provides=('grok-bot' 'sand')
|
||||
conflicts=('grok-bot' 'sand')
|
||||
replaces=('sand')
|
||||
options=('!strip' '!debug')
|
||||
source=("https://downloads.cursor.com/grokbot/stable/${_commit}/linux/x64/grok-bot_${pkgver}_amd64.deb")
|
||||
source=(
|
||||
"https://downloads.cursor.com/grokbot/stable/${_commit}/linux/x64/grok-bot_${pkgver}_amd64.deb"
|
||||
"grok-bot-launch.sh"
|
||||
)
|
||||
noextract=("grok-bot_${pkgver}_amd64.deb")
|
||||
sha256sums=('fb888b2204c8a51c71a9f5f9a2913ac10561f3ef6939c1245ecae4e837d4ada2')
|
||||
sha256sums=(
|
||||
'fb888b2204c8a51c71a9f5f9a2913ac10561f3ef6939c1245ecae4e837d4ada2'
|
||||
'886c8b55eb44d2f7812be50dcc1571907dc2d7e755171e67e916f497634f09eb'
|
||||
)
|
||||
|
||||
package() {
|
||||
bsdtar -O -xf "$srcdir/grok-bot_${pkgver}_amd64.deb" data.tar.xz \
|
||||
| bsdtar -xJf - -C "$pkgdir"
|
||||
|
||||
if [[ -f "$pkgdir/opt/Grok Bot/grok-bot" ]]; then
|
||||
_bin=grok-bot
|
||||
else
|
||||
_bin=sand
|
||||
fi
|
||||
|
||||
install -dm755 "$pkgdir/usr/bin"
|
||||
ln -sf "/opt/Grok Bot/${_bin}" "$pkgdir/usr/bin/${_bin}"
|
||||
if [[ "$_bin" != grok-bot ]]; then
|
||||
ln -sf "/opt/Grok Bot/${_bin}" "$pkgdir/usr/bin/grok-bot"
|
||||
fi
|
||||
# Auto-update launch shim (not a plain symlink into /opt).
|
||||
install -Dm755 "$srcdir/grok-bot-launch.sh" "$pkgdir/usr/bin/grok-bot"
|
||||
# Keep provides(sand) on PATH; both names run the same shim.
|
||||
ln -sf grok-bot "$pkgdir/usr/bin/sand"
|
||||
|
||||
# Path contains a space, so Chromium cannot use the SUID sandbox.
|
||||
# Arch/CachyOS kernels have user namespaces; keep chrome-sandbox non-setuid.
|
||||
|
||||
Reference in New Issue
Block a user