Move the four templates' static file bodies into .tpl files under
data/templates/<id>/, referenced by their manifests' files: lists —
the shell skeleton script (executable, {command}-named) with its
skeleton-only debian/install mapping, the empty template's stub README,
the makefile hello.c/Makefile skeleton with its skeleton-only install
mapping, and go's go.mod/main.go skeleton (the go directive of go.mod
stays a literal: nothing about it is answer-derived).
The empty template ends up hookless — zero Rust, its registry entry
points at no hooks — and src/new/templates/empty.rs is deleted. The
shell and go hooks shrink to their probes (plus go's {go_import_path}
context value); the makefile hooks keep only the existing-tree hint
probing the packaged Makefile for a phony install: target, since that
heuristic reads the tree and cannot be data.
26 lines
863 B
YAML
26 lines
863 B
YAML
## The `shell` template: a single interpreted script installed to
|
|
## /usr/bin with plain `dh $@` plumbing. Detection is not marker-based: the
|
|
## single-script heuristic of src/new/detect.rs (a lone *.sh or shebang
|
|
## file) maps here. The probe pre-filling the wizard answers from the
|
|
## script file name lives in src/new/templates/shell.rs; everything else
|
|
## is the data below (the skeleton script is executable, the install
|
|
## mapping exists for skeletons only — packaging an existing tree leaves
|
|
## the mapping to the user).
|
|
##
|
|
## Schema: see src/new/templates/mod.rs.
|
|
|
|
id: shell
|
|
label: Shell script / single interpreted file
|
|
detect:
|
|
files: []
|
|
build_depends: []
|
|
architecture: all
|
|
rules_dh_line: "dh $@"
|
|
files:
|
|
- path: "{command}.sh"
|
|
template: script.tpl
|
|
executable: true
|
|
- path: debian/install
|
|
template: install.tpl
|
|
skeleton_only: true
|