From 428b3198dc3bd69c96cbf8fd59cd31145fef2bf5 Mon Sep 17 00:00:00 2001 From: Michel-FK Date: Mon, 28 Dec 2020 11:01:39 +0100 Subject: [PATCH] create images directory for SDK Signed-off-by: Michel-FK --- Makefile | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index 007530d..86a6c02 100644 --- a/Makefile +++ b/Makefile @@ -61,16 +61,14 @@ sdk: buildroot SDK/output/.config @$(call MESSAGE,"Making FunKey SDK") @$(BRMAKE) BR2_EXTERNAL=../SDK O=../SDK/output prepare-sdk @$(call MESSAGE,"Generating SDK tarball") - @cd SDK/output/host; \ - PWD=$(shell pwd); \ export LC_ALL=C; \ SDK=FunKey-sdk-$(shell cat FunKey/board/funkey/rootfs-overlay/etc/sw-versions | cut -f 2); \ - grep -lr "$(shell pwd)/SDK/output/host" . | while read -r FILE ; do \ + grep -lr "$(shell pwd)/SDK/output/host" SDK/output/host | while read -r FILE ; do \ if file -b --mime-type "$${FILE}" | grep -q '^text/'; then \ sed -i "s|$(shell pwd)/SDK/output/host|/opt/$${SDK}|g" "$${FILE}"; \ fi; \ done; \ - cd $(shell pwd); \ + mkdir -p images; \ tar czf "images/$${SDK}.tar.gz" \ --owner=0 --group=0 --numeric-owner \ --transform="s#^$(patsubst /%,%,$(shell pwd))/SDK/output/host#$${SDK}#" \