From f4dfa9b1fa4af068aec30ecd3826322307bf4a9a Mon Sep 17 00:00:00 2001 From: Storm Dragon Date: Wed, 2 Mar 2022 09:21:37 -0500 Subject: [PATCH] Save image to temperary file instead of to stdout. --- build/build-stormux.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/build/build-stormux.sh b/build/build-stormux.sh index f15e3ed..387702a 100755 --- a/build/build-stormux.sh +++ b/build/build-stormux.sh @@ -31,6 +31,9 @@ cleanup() { partx -d "${loopdev}" losetup --detach "${loopdev}" fi + if [[ -n "${imageFileName}" ]]; then + rm "${imageFileName}" + fi exit 0 } @@ -139,7 +142,9 @@ mkdir /mnt/boot mount "${loopdev}p1" /mnt/boot # Things are mounted now, so set mounted to 0 (bash true) mounted=0 -wget "${url[$imageVersion]}" -O- | bsdtar -xpf - -C /mnt +imageFileName=$(mktemp) +wget "${url[$imageVersion]}" -O "${imageFileName}" +bsdtar -xpf "${imageFileName}" -C /mnt arch-chroot /mnt << EOF # set up pacman pacman-key --init