]> git.plutz.net Git - blast/commitdiff
slightly tidier code
authorPaul Hänsch <paul@plutz.net>
Mon, 13 Apr 2026 19:57:44 +0000 (21:57 +0200)
committerPaul Hänsch <paul@plutz.net>
Mon, 13 Apr 2026 19:57:44 +0000 (21:57 +0200)
Makefile
targets/raspberrypi.mk

index e4c93ff689365a405502c5e5405b47c977d7b950..49081046dee1f8ebe339371a5379e8c5ef666339 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -15,18 +15,16 @@ _target: _config
 
 ARCH := amd64
 BOOTSTRAP := http://deb.debian.org/debian
-PACKAGES := ${PACKAGES} apt busybox-static debian-archive-keyring init systemd
 CFGROOT := cfg_root
 SYSROOT = sys_root_${release}_${ARCH}
 
+PACKAGES := ${PACKAGES} apt busybox-static debian-archive-keyring init systemd
+
 config.mk:
        cp "config.example" "$@"
 
-ifndef config
-  include config.mk
-else
-  include ${config}
-endif
+config ?= config.mk
+include ${config}
 
 ifndef release
   release := trixie
index cdd2049db73a15f44f243eec869faa28bc754272..14e4194b8574fd54ff408ba87c31f3ad51eb9185 100644 (file)
@@ -81,7 +81,7 @@ ${PROOT}: .FORCE
        dd bs=1M count=0 seek=${ROOT_MB} of="$${PROOT}"
 
 _partition_raspi: ${VOLUME} .FORCE
-       printf "$${PARTLAYOUT}" |sfdisk "$${VOLUME}"
+       printf '%s\n' "$${PARTLAYOUT}" | sfdisk "$${VOLUME}"
 
 _format_root: ${PROOT}
        mkfs.${fstype} -L FSROOT "$${PROOT}"