diff options
| author | Vaxry <vaxry@vaxry.net> | 2025-02-24 13:11:25 +0000 |
|---|---|---|
| committer | Vaxry <vaxry@vaxry.net> | 2025-02-24 13:11:30 +0000 |
| commit | 73ae9790f994fe3f0194a5e225106c3dddb77d84 (patch) | |
| tree | 83c31aef7ac55224930fc2f5e53f803f794e2c17 /hyprpm/src/core/PluginManager.cpp | |
| parent | 3458d7ac93a101ea534ef6d0bcbc32725e267045 (diff) | |
hyprpm: add --hl-url for custom forks
Diffstat (limited to 'hyprpm/src/core/PluginManager.cpp')
| -rw-r--r-- | hyprpm/src/core/PluginManager.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/hyprpm/src/core/PluginManager.cpp b/hyprpm/src/core/PluginManager.cpp index 80d0a402..3343cbe0 100644 --- a/hyprpm/src/core/PluginManager.cpp +++ b/hyprpm/src/core/PluginManager.cpp @@ -463,7 +463,9 @@ bool CPluginManager::updateHeaders(bool force) { return false; } - progress.printMessageAbove(statusString("!", Colors::YELLOW, "Cloning https://github.com/hyprwm/Hyprland, this might take a moment.")); + const auto& HL_URL = m_szCustomHlUrl.empty() ? "https://github.com/hyprwm/Hyprland" : m_szCustomHlUrl; + + progress.printMessageAbove(statusString("!", Colors::YELLOW, "Cloning {}, this might take a moment.", HL_URL)); const bool bShallow = (HLVER.branch == "main") && !m_bNoShallow; @@ -474,12 +476,12 @@ bool CPluginManager::updateHeaders(bool force) { if (m_bVerbose && bShallow) progress.printMessageAbove(verboseString("will shallow since: {}", SHALLOW_DATE)); - std::string ret = execAndGet(std::format("cd {} && git clone --recursive https://github.com/hyprwm/Hyprland hyprland-{}{}", getTempRoot(), USERNAME, - (bShallow ? " --shallow-since='" + SHALLOW_DATE + "'" : ""))); + std::string ret = + execAndGet(std::format("cd {} && git clone --recursive {} hyprland-{}{}", getTempRoot(), HL_URL, USERNAME, (bShallow ? " --shallow-since='" + SHALLOW_DATE + "'" : ""))); if (!std::filesystem::exists(WORKINGDIR)) { progress.printMessageAbove(failureString("Clone failed. Retrying without shallow.")); - ret = execAndGet(std::format("cd {} && git clone --recursive https://github.com/hyprwm/hyprland hyprland-{}", getTempRoot(), USERNAME)); + ret = execAndGet(std::format("cd {} && git clone --recursive {} hyprland-{}", getTempRoot(), HL_URL, USERNAME)); } if (!std::filesystem::exists(WORKINGDIR + "/.git")) { |
