Use correct package manager
This commit is contained in:
parent
fd510861c6
commit
64d080336c
@ -28,10 +28,13 @@ namespace LinuxConfigApp
|
|||||||
public string ReleaseIdentifier => LibationScaffolding.ReleaseIdentifier.ToString() + (File.Exists("/bin/yum") ? "_RPM" : "");
|
public string ReleaseIdentifier => LibationScaffolding.ReleaseIdentifier.ToString() + (File.Exists("/bin/yum") ? "_RPM" : "");
|
||||||
|
|
||||||
//only run the auto upgrader if the current app was installed from the
|
//only run the auto upgrader if the current app was installed from the
|
||||||
//.deb package. Try to detect this by checking if the symlink exists.
|
//.deb or .rpm package. Try to detect this by checking if the symlink exists.
|
||||||
public bool CanUpgrade => Directory.Exists("/usr/lib/libation");
|
public bool CanUpgrade => Directory.Exists("/usr/lib/libation");
|
||||||
public void InstallUpgrade(string upgradeBundle)
|
public void InstallUpgrade(string upgradeBundle)
|
||||||
{
|
{
|
||||||
|
if (File.Exists("/bin/yum"))
|
||||||
|
RunAsRoot("yum", $"install '{upgradeBundle}'");
|
||||||
|
else
|
||||||
RunAsRoot("apt", $"install '{upgradeBundle}'");
|
RunAsRoot("apt", $"install '{upgradeBundle}'");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user