Skip to content

Commit 3685bc2

Browse files
hyperpolymathclaude
andcommitted
chore(nqc/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. No config change — the source nqc.launcher.a2ml is unchanged. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 48851f9 commit 3685bc2

1 file changed

Lines changed: 27 additions & 1 deletion

File tree

nqc/nqc-launcher.sh

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,12 @@ RUNTIME_KIND="process"
4747
REPO_DIR="/var/mnt/eclipse/repos/nextgen-databases/nqc"
4848
ICON_SOURCE="/var/mnt/eclipse/repos/nextgen-databases/nqc/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/nextgen-databases/nqc/nqc.launcher.a2ml"
55+
5056
URL=""
5157

5258

@@ -293,6 +299,18 @@ do_integ_linux() {
293299
}
294300

295301
do_integ() {
302+
# Fast path: delegate to `launch-scaffolder provision` when it's on
303+
# $PATH and the source config is still where it was at mint time.
304+
# Keeps one authoritative implementation instead of drifting between
305+
# this template and the Rust binary. Falls through to the shell
306+
# implementation if either condition fails.
307+
if command -v launch-scaffolder >/dev/null 2>&1 && [ -n "$CONFIG_FILE" ] && [ -f "$CONFIG_FILE" ]; then
308+
local forward=(launch-scaffolder provision --integ "$CONFIG_FILE" --no-confirm)
309+
[ "$FORCE" = "true" ] && forward+=(--force)
310+
log "Delegating to launch-scaffolder provision..."
311+
exec "${forward[@]}"
312+
fi
313+
296314
if already_integrated && [ "$FORCE" != "true" ]; then
297315
warn "$APP_DISPLAY is already integrated."
298316
read -rp "Reinstall? [y/N] " confirm
@@ -307,11 +325,19 @@ do_integ() {
307325
}
308326

309327
do_disinteg() {
310-
log "Removing $APP_DISPLAY system integration..."
328+
# Fast path: delegate to `launch-scaffolder provision --disinteg`
329+
# when available. Stop any running process first so the binary
330+
# doesn't have to re-implement the process-management arm.
311331
if is_running; then
312332
log " • stopping running server"
313333
stop_server
314334
fi
335+
if command -v launch-scaffolder >/dev/null 2>&1 && [ -n "$CONFIG_FILE" ] && [ -f "$CONFIG_FILE" ]; then
336+
log "Delegating to launch-scaffolder provision..."
337+
exec launch-scaffolder provision --disinteg "$CONFIG_FILE" --no-confirm
338+
fi
339+
340+
log "Removing $APP_DISPLAY system integration..."
315341
local removed_anything="false"
316342
local targets=(
317343
"$DESKTOP_FILE_TARGET"

0 commit comments

Comments
 (0)