mirror of
https://github.com/hyprwm/Hyprland
synced 2024-12-25 20:09:48 +01:00
find branch too
This commit is contained in:
parent
c16f149718
commit
07df71b430
1 changed files with 4 additions and 1 deletions
|
@ -274,6 +274,9 @@ bool CPluginManager::updateHeaders() {
|
||||||
std::string hlcommit = HLVERCALL.substr(HLVERCALL.find("at commit") + 10);
|
std::string hlcommit = HLVERCALL.substr(HLVERCALL.find("at commit") + 10);
|
||||||
hlcommit = hlcommit.substr(0, hlcommit.find_first_of(' '));
|
hlcommit = hlcommit.substr(0, hlcommit.find_first_of(' '));
|
||||||
|
|
||||||
|
std::string hlbranch = HLVERCALL.substr(HLVERCALL.find("from branch") + 12);
|
||||||
|
hlbranch = hlbranch.substr(0, hlbranch.find(" at commit "));
|
||||||
|
|
||||||
if (!std::filesystem::exists("/tmp/hyprpm")) {
|
if (!std::filesystem::exists("/tmp/hyprpm")) {
|
||||||
std::filesystem::create_directory("/tmp/hyprpm");
|
std::filesystem::create_directory("/tmp/hyprpm");
|
||||||
std::filesystem::permissions("/tmp/hyprpm", std::filesystem::perms::all, std::filesystem::perm_options::replace);
|
std::filesystem::permissions("/tmp/hyprpm", std::filesystem::perms::all, std::filesystem::perm_options::replace);
|
||||||
|
@ -310,7 +313,7 @@ bool CPluginManager::updateHeaders() {
|
||||||
progress.m_szCurrentMessage = "Checking out sources";
|
progress.m_szCurrentMessage = "Checking out sources";
|
||||||
progress.print();
|
progress.print();
|
||||||
|
|
||||||
ret = execAndGet("cd /tmp/hyprpm/hyprland && git reset --hard --recurse-submodules " + hlcommit);
|
ret = execAndGet("cd /tmp/hyprpm/hyprland && git checkout " + hlbranch + " && git reset --hard --recurse-submodules " + hlcommit);
|
||||||
|
|
||||||
progress.printMessageAbove(std::string{Colors::GREEN} + "✔" + Colors::RESET + " checked out to running ver");
|
progress.printMessageAbove(std::string{Colors::GREEN} + "✔" + Colors::RESET + " checked out to running ver");
|
||||||
progress.m_iSteps = 3;
|
progress.m_iSteps = 3;
|
||||||
|
|
Loading…
Reference in a new issue