Skip to content

Commit da5ffda

Browse files
hyperpolymathclaude
andcommitted
chore(launcher): regenerate for launch-scaffolder provision delegation
Regenerated by `launch-scaffolder realign` (launch-scaffolder@99534b0) to pick up the new template. Two behavioural changes land in the script: - CONFIG_FILE=<absolute path> is embedded so the --integ / --disinteg arms know where the source .launcher.a2ml lives. - --integ and --disinteg now fast-path to `launch-scaffolder provision` when the binary is on PATH, falling back to the existing shell implementation otherwise. Integrated launchers behave identically; the binary just becomes authoritative for .desktop file writes and desktop-database updates when present. No config change in this repo — the source .launcher.a2ml is unchanged. Pure regeneration. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 3bf9378 commit da5ffda

File tree

1 file changed

+27
-1
lines changed

1 file changed

+27
-1
lines changed

panll-launcher.sh

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,12 @@ RUNTIME_KIND="server-url"
4747
REPO_DIR="/var/mnt/eclipse/repos/panll"
4848
ICON_SOURCE="/var/mnt/eclipse/repos/panll/assets/icon-256.png"
4949

50+
# Absolute path back to the per-app `<app>.launcher.a2ml` config that
51+
# produced this script. Consumed by the --integ / --disinteg arms when
52+
# the `launch-scaffolder` binary is on $PATH, so they can delegate to
53+
# the Rust implementation instead of running the shell fallback.
54+
CONFIG_FILE="/var/mnt/eclipse/repos/panll/panll.launcher.a2ml"
55+
5056
URL="http://localhost:8000/public/"
5157
APP_PORT="8000"
5258
WAIT_SECONDS="15"
@@ -319,6 +325,18 @@ do_integ_linux() {
319325
}
320326

321327
do_integ() {
328+
# Fast path: delegate to `launch-scaffolder provision` when it's on
329+
# $PATH and the source config is still where it was at mint time.
330+
# Keeps one authoritative implementation instead of drifting between
331+
# this template and the Rust binary. Falls through to the shell
332+
# implementation if either condition fails.
333+
if command -v launch-scaffolder >/dev/null 2>&1 && [ -n "$CONFIG_FILE" ] && [ -f "$CONFIG_FILE" ]; then
334+
local forward=(launch-scaffolder provision --integ "$CONFIG_FILE" --no-confirm)
335+
[ "$FORCE" = "true" ] && forward+=(--force)
336+
log "Delegating to launch-scaffolder provision..."
337+
exec "${forward[@]}"
338+
fi
339+
322340
if already_integrated && [ "$FORCE" != "true" ]; then
323341
warn "$APP_DISPLAY is already integrated."
324342
read -rp "Reinstall? [y/N] " confirm
@@ -333,11 +351,19 @@ do_integ() {
333351
}
334352

335353
do_disinteg() {
336-
log "Removing $APP_DISPLAY system integration..."
354+
# Fast path: delegate to `launch-scaffolder provision --disinteg`
355+
# when available. Stop any running process first so the binary
356+
# doesn't have to re-implement the process-management arm.
337357
if is_running; then
338358
log " • stopping running server"
339359
stop_server
340360
fi
361+
if command -v launch-scaffolder >/dev/null 2>&1 && [ -n "$CONFIG_FILE" ] && [ -f "$CONFIG_FILE" ]; then
362+
log "Delegating to launch-scaffolder provision..."
363+
exec launch-scaffolder provision --disinteg "$CONFIG_FILE" --no-confirm
364+
fi
365+
366+
log "Removing $APP_DISPLAY system integration..."
341367
local removed_anything="false"
342368
local targets=(
343369
"$DESKTOP_FILE_TARGET"

0 commit comments

Comments
 (0)