mirror of
https://github.com/BeamMP/BeamMP-Server.git
synced 2026-05-19 16:10:41 +00:00
leave out version if not exists
This commit is contained in:
+9
-3
@@ -1,13 +1,13 @@
|
|||||||
#include "Update.h"
|
#include "Update.h"
|
||||||
#include "Common.h"
|
#include "Common.h"
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
|
#include <boost/predef.h>
|
||||||
#include <cerrno>
|
#include <cerrno>
|
||||||
#include <cstdio>
|
#include <cstdio>
|
||||||
#include <cstdlib>
|
#include <cstdlib>
|
||||||
#include <filesystem>
|
#include <filesystem>
|
||||||
#include <httplib.h>
|
#include <httplib.h>
|
||||||
#include <nlohmann/json.hpp>
|
#include <nlohmann/json.hpp>
|
||||||
#include <boost/predef.h>
|
|
||||||
|
|
||||||
#if defined(__linux)
|
#if defined(__linux)
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
@@ -122,14 +122,20 @@ void Update::PerformUpdate(const std::string& InvokedAs) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
beammp_infof("Distribution: {} {}", DistroID, DistroVersion);
|
beammp_infof("Distribution: {} {}", DistroID, DistroVersion);
|
||||||
const auto Distro = DistroID + "." + DistroVersion;
|
|
||||||
|
std::string Distro = {};
|
||||||
|
if (DistroVersion.empty()) {
|
||||||
|
Distro = DistroID;
|
||||||
|
} else {
|
||||||
|
Distro = DistroID + "." + DistroVersion;
|
||||||
|
}
|
||||||
|
|
||||||
Postfix = fmt::format(".{}.{}.{}", DistroID, DistroVersion, Arch);
|
Postfix = fmt::format(".{}.{}.{}", DistroID, DistroVersion, Arch);
|
||||||
#else
|
#else
|
||||||
beammp_infof("BeamMP doesn't provide binaries for this OS, please update manually");
|
beammp_infof("BeamMP doesn't provide binaries for this OS, please update manually");
|
||||||
std::exit(1);
|
std::exit(1);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
beammp_infof("Looking for BeamMP-Server{}", Postfix);
|
beammp_infof("Looking for BeamMP-Server{}", Postfix);
|
||||||
|
|
||||||
// check if the release exists for that platform
|
// check if the release exists for that platform
|
||||||
|
|||||||
Reference in New Issue
Block a user