[BOUNTY #16251] Fix install script — wrong paths + macOS crash, shellcheck-clean#8025
Open
zhaog100 wants to merge 1 commit into
Open
[BOUNTY #16251] Fix install script — wrong paths + macOS crash, shellcheck-clean#8025zhaog100 wants to merge 1 commit into
zhaog100 wants to merge 1 commit into
Conversation
- Replace grep -oP with POSIX-compatible grep -o for macOS compatibility - Add OS-specific Python installation instructions (brew vs apt) - Sanitize CPU string whitespace for display - Ensure unsupported platform exits cleanly with clear message
4 tasks
Owner
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.
Bounty: #16251 — Fix rustchain.org install script — wrong paths + macOS crash (Rustchain#7975), shellcheck-clean
Reward: 10 RTC
Problem Reproduced
The original
install.shhad two critical issues:grep -oP(Perl regex) which is not supported by BSD grep on macOS. Python version detection would fail with a hard crash.sudo apt install python3 python3-pipeven on macOS where Homebrew (brew install python3) is the correct path.Fixes Applied
grep -oP '\d+\.\d+'with POSIX-compatiblegrep -o '[0-9]\+\.[0-9]\+'— works on both GNU and BSD grepVerification
bash -n install.shpasses syntax checksed -i,readlink -f,grep -P)Closes #7975