From 59980008de056ffa363605a83e5446bd725ae158 Mon Sep 17 00:00:00 2001 From: kn Date: Sun, 26 Mar 2023 19:25:16 +0000 Subject: [PATCH] Simplify apple firmware copying Less duplicate code, easier to add new firmware. OK afresh1 --- distrib/arm64/ramdisk/install.md | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/distrib/arm64/ramdisk/install.md b/distrib/arm64/ramdisk/install.md index 742907fa2c2..46c747f2798 100644 --- a/distrib/arm64/ramdisk/install.md +++ b/distrib/arm64/ramdisk/install.md @@ -1,4 +1,4 @@ -# $OpenBSD: install.md,v 1.37 2023/03/25 18:29:37 kn Exp $ +# $OpenBSD: install.md,v 1.38 2023/03/26 19:25:16 kn Exp $ # # # Copyright (c) 1996 The NetBSD Foundation, Inc. @@ -55,14 +55,9 @@ md_installboot() { case $_plat in apple) - if [[ -d /etc/firmware/apple ]]; then - (cd /etc/firmware - pax -rw apple /mnt/etc/firmware) - fi - if [[ -d /etc/firmware/apple-bwfm ]]; then - (cd /etc/firmware - pax -rw apple-bwfm /mnt/etc/firmware) - fi + (cd /etc/firmware; for _dir in apple{,-bwfm}; do + [[ -d $_dir ]] && pax -rw $_dir /mnt/etc/firmware + done) ;; pine64) dd if=$_mdec/u-boot-sunxi-with-spl.bin of=${_disk}c \ -- 2.20.1