feat: add --cn flag to install from Gitee mirror (China) - #97
Merged
Conversation
Add a --cn flag that forces all downloads to the Gitee mirror for users in mainland China where raw.githubusercontent.com is unreliable. Changes: - Pre-scan args for --cn before downloading the installer framework (framework URL itself must use the correct source) - Switch INSTALLER_URL to Gitee when --cn is set - Parameterize GIT_REPO / GIT_RAW_BASE / GIT_RAW_SEP / PIPOWER5_DTBO_URL (Gitee raw URL format needs a /raw/ segment) - Replace all hardcoded GitHub URLs in install.sh with the variables - Fix install report label to show Gitee (--cn) Usage: curl -sSL https://gitee.com/sunfounder/pironman5/raw/1.3.x/install.sh | sudo bash -s -- --cn
This was referenced Aug 7, 2026
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.
Summary
Add a
--cnflag that forces all downloads to the Gitee mirror, for users in mainland China whereraw.githubusercontent.comis often unreachable.Previously the installer framework had a GitHub-availability check with Gitee fallback, but it was unreliable: several URLs in
install.shwere hardcoded to GitHub and bypassed the fallback entirely, and the framework itself is downloaded from GitHub before any check runs.Changes
--cnbefore downloading the installer framework (the framework URL itself must use the correct source)INSTALLER_URLto Gitee when--cnis setGIT_REPO/GIT_RAW_BASE/GIT_RAW_SEP/PIPOWER5_DTBO_URL(Gitee raw URL format requires a/raw/segment)install.shwith the new variablesGitee (--cn)when the flag is usedHow to test
Verified: all 7 derived Gitee URLs (version.py fetches, installer framework, dtbo, HDMI EDID plugin) return 200; all 5 repos (pironman5, pipower5, pm_auto, pm_dashboard, sf_rpi_status) are cloneable from Gitee.