feat/release-page #2
1 changed files with 1 additions and 5 deletions
Makefile: collapse 'case ... esac' onto one shell line
Some checks failed
Forgejo Release postit-deb / release (push) Failing after 10m55s
Some checks failed
Forgejo Release postit-deb / release (push) Failing after 10m55s
make runs each recipe line in its own shell (typically /bin/sh = dash on Debian). A multi-line case/esac block — same gotcha as the earlier 'if/then/fi' — gets split across shells, and the second shell sees 'esac' as a stray keyword and bails: /bin/sh: 1: Syntax error: end of file unexpected (expecting ")") Collapse the case into a single line with a command substitution, then assign the result to DPKG_ARCH_ARGS. Same pattern as the single-line if/then/fi used later.
commit
b9cae77789
6
Makefile
6
Makefile
|
|
@ -49,11 +49,7 @@ deb:
|
||||||
# For linux-x64, it sets the host arch to amd64 explicitly
|
# For linux-x64, it sets the host arch to amd64 explicitly
|
||||||
# (which matches the runner — no-op, but keeps the call site
|
# (which matches the runner — no-op, but keeps the call site
|
||||||
# uniform). Other RIDs are rejected.
|
# uniform). Other RIDs are rejected.
|
||||||
case "$(POSTIT_RUNTIME)" in
|
DPKG_ARCH_ARGS=$$(case "$(POSTIT_RUNTIME)" in linux-arm64) echo "-aarm64" ;; linux-x64) echo "-aamd64" ;; *) echo "unsupported POSTIT_RUNTIME=$(POSTIT_RUNTIME)" >&2; exit 1 ;; esac)
|
||||||
linux-arm64) DPKG_ARCH_ARGS="-aarm64" ;;
|
|
||||||
linux-x64) DPKG_ARCH_ARGS="-aamd64" ;;
|
|
||||||
*) echo " ERROR: unsupported POSTIT_RUNTIME=$(POSTIT_RUNTIME)" >&2; exit 1 ;;
|
|
||||||
esac
|
|
||||||
# dpkg-architecture with no -t/-a flags just prints the arch
|
# dpkg-architecture with no -t/-a flags just prints the arch
|
||||||
# info; with -aarm64, it exports the variables needed for a
|
# info; with -aarm64, it exports the variables needed for a
|
||||||
# cross-build targeting arm64. Use 'eval' to put those vars
|
# cross-build targeting arm64. Use 'eval' to put those vars
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue