From 80f113cc4c24bd05ad6df20a4e4d2f42ca885ace Mon Sep 17 00:00:00 2001 From: m-sz Date: Mon, 30 Dec 2024 15:55:58 +0100 Subject: [PATCH] Improve cross-compatibility of used dependencies Some of the tools used during the image creation process were executed based on their absolute path (eg. /sbin), which might not be the case. Changed them to just use the executable's name. Changed scripts shebang to use the more generic `#!/usr/bin/env bash` to accomodate different OSes. --- Makefile | 1 + create-live-image.sh | 14 +++++++------- get-merged-rootfs.sh | 2 +- 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/Makefile b/Makefile index e56bef0..eb297e0 100644 --- a/Makefile +++ b/Makefile @@ -1,3 +1,4 @@ +.PHONY: all clean LOCAL_DIR ?= $(shell readlink -m $(dir $(abspath $(lastword $(MAKEFILE_LIST))))) WORK_DIR ?= $(LOCAL_DIR)/work diff --git a/create-live-image.sh b/create-live-image.sh index 5609692..72d91ba 100755 --- a/create-live-image.sh +++ b/create-live-image.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash set -eux -o pipefail @@ -33,7 +33,7 @@ trap "cleanup ${MNTDIR}" 0 1 2 3 6 15 truncate -s 16G "${IMG}" # have static UUIDs to make partition table reproducible -/usr/sbin/sfdisk "$IMG" <