Skip to content

Conversation

@AntiSol
Copy link

@AntiSol AntiSol commented Mar 8, 2023

Hi,

Here are some tweaks I made to writeimage.sh:

  • decompress images on the fly, no intermediate file (save some disk space / cleanup headaches)
  • use pv (if available) to show pretty progress bar for image write (otherwise show dd progress info)
  • use dd's direct/sync options, no need to sync all disks (might be marginally faster)
  • move superuser check to last (so that other args are parsed and warnings show before running elevated or prompting for password)

Hope you like! :)

msg "decompressing the .xz compressed image"
$unxz -T 0 -c "$DISK_IMG" > "${DISK_IMG%???}"
DISK_IMG=${DISK_IMG%???}
extractor=$xz
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

note that according to the xz man page -T 0 isn't implemented for decompression, but if it were you could addextractopts=(-d -c -T 0) here to support that.

@AntiSol
Copy link
Author

AntiSol commented Oct 25, 2024

Only those with [write access](https://docs.github.com/articles/what-are-the-different-access-permissions) to this repository can merge pull requests.

I think that means someone who isn't me has to press "merge"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants