Merged
Conversation
- Use `which` to check for `gsed` and use it if available:
macos ships with BSD sed which doesn't support `-i` for in-place
editing
- get the primary group of the current user with `id -gn` instead
of hardcoding it to `${USER}` - macos doesn't create a group
with the same name as the user by default
- Add quotes around a bunch of variables to prevent globbing /
word splitting
- Use `set -euo pipefail` to make the script fail on errors and
undefined variables, rather than silently continuing
- Use '-s' flag with curl to prevent it from printing the download
progress bar when retrieving version info
- Check we can retrieve the filename of the latest Raspbian image
before downloading it
- Print out the URL of the image we're downloading
Owner
|
Thanks for giving attention to this tool. Hope it would get more people to create more distributions :) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hello!
I have made some improvements to
make_custom_pi_osafter having some friction getting started on macos:Improve portability of make_custom_pi_os
whichto check forgsedand use it if available:macos ships with BSD sed which doesn't support
-ifor in-placeediting
id -gninsteadof hardcoding it to
${USER}- macos doesn't create a groupwith the same name as the user by default
word splitting
set -euo pipefailto make the script fail on errors andundefined variables, rather than silently continuing
progress bar when retrieving version info
before downloading it
Allow specifying variant when creating new custom os
Rather than just the hardcoded
raspios_lite_armhf, users can now specifyraspios_lite_armhforraspios_lite_arm64with-v/--variantGuard against space / hyphen in the destination folder
This causes some pain, as the default module uses this directory name for creating variables.
If these characters are just disallowed, this pain goes away