Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

improvements to writeimage.sh #2980

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from

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