From faa0aafc5af1a1e0b29971c33d8408798b2b58a7 Mon Sep 17 00:00:00 2001 From: Lukas Bachschwell Date: Tue, 24 Nov 2020 12:11:39 +0100 Subject: [PATCH] Enable image copy (#84) Use copy when BASE_ZIP_IMG is an already extracted image --- src/custompios | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/custompios b/src/custompios index 936c9cfd..7e732b90 100755 --- a/src/custompios +++ b/src/custompios @@ -91,7 +91,14 @@ pushd $BASE_WORKSPACE echo "Error: could not find image: $BASE_ZIP_IMG" exit 1 fi - 7za x -aoa "$BASE_ZIP_IMG" + + if [[ $BASE_ZIP_IMG =~ \.img$ ]]; then + # if the image is already extracted copy over + cp "$BASE_ZIP_IMG" . + else + 7za x -aoa "$BASE_ZIP_IMG" + fi + BASE_IMG_PATH=`ls | grep '.img$\|.raw$' | head -n 1` if [ ! -f "$BASE_IMG_PATH" ]; then echo "Error, can't find image path, did you place an image in the image folder?"