Adds os recognition support for manjaro linux (#154)
This commit is contained in:
committed by
Roey Darwish Dror
parent
c0c155fc8b
commit
9e89bfc84b
@@ -18,7 +18,7 @@ Topgrade knows that platform and can utilize its unique features, such as the op
|
|||||||
package manager. Topgrade is tested on and knows the following platforms:
|
package manager. Topgrade is tested on and knows the following platforms:
|
||||||
|
|
||||||
* Linux
|
* Linux
|
||||||
* Arch
|
* Arch (Antergos, Manjaro)
|
||||||
* CentOS/RHEL
|
* CentOS/RHEL
|
||||||
* Fedora
|
* Fedora
|
||||||
* Debian/Ubuntu
|
* Debian/Ubuntu
|
||||||
@@ -47,7 +47,7 @@ Just run `topgrade`. It will run the following steps:
|
|||||||
* Try to self-upgrade if compiled with this feature. On Unix systems Topgrade will also respawn
|
* Try to self-upgrade if compiled with this feature. On Unix systems Topgrade will also respawn
|
||||||
itself if it was upgraded
|
itself if it was upgraded
|
||||||
* **Linux**: Run the system package manager:
|
* **Linux**: Run the system package manager:
|
||||||
* **Arch**: Run [yay](https://github.com/Jguer/yay) or fall back to pacman
|
* **Arch (based)**: Run [yay](https://github.com/Jguer/yay) or fall back to pacman
|
||||||
* **CentOS/RHEL**: Run `yum upgrade`
|
* **CentOS/RHEL**: Run `yum upgrade`
|
||||||
* **Fedora**: Run `dnf upgrade`
|
* **Fedora**: Run `dnf upgrade`
|
||||||
* **Debian/Ubuntu**: Run `apt update && apt dist-upgrade`
|
* **Debian/Ubuntu**: Run `apt update && apt dist-upgrade`
|
||||||
|
|||||||
@@ -36,7 +36,7 @@ impl Distribution {
|
|||||||
match (os_release.id.as_ref(), os_release.id_like.as_ref().map(String::as_str)) {
|
match (os_release.id.as_ref(), os_release.id_like.as_ref().map(String::as_str)) {
|
||||||
("debian", _) | (_, Some("debian")) | (_, Some("ubuntu")) => Distribution::Debian,
|
("debian", _) | (_, Some("debian")) | (_, Some("ubuntu")) => Distribution::Debian,
|
||||||
(_, Some("\"suse\"")) => Distribution::Suse,
|
(_, Some("\"suse\"")) => Distribution::Suse,
|
||||||
("arch", _) | (_, Some("archlinux")) | (_, Some("\"arch\"")) => Distribution::Arch,
|
("arch", _) | (_, Some("archlinux")) | (_, Some("\"arch\"")) | (_, Some("arch")) => Distribution::Arch,
|
||||||
("\"centos\"", _) | ("\"ol\"", _) => Distribution::CentOS,
|
("\"centos\"", _) | ("\"ol\"", _) => Distribution::CentOS,
|
||||||
("fedora", _) => Distribution::Fedora,
|
("fedora", _) => Distribution::Fedora,
|
||||||
("void", _) => Distribution::Void,
|
("void", _) => Distribution::Void,
|
||||||
@@ -384,4 +384,10 @@ mod tests {
|
|||||||
fn test_antergos() {
|
fn test_antergos() {
|
||||||
test_template(&include_str!("os_release/antergos"), Distribution::Arch);
|
test_template(&include_str!("os_release/antergos"), Distribution::Arch);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn test_manjaro() {
|
||||||
|
test_template(&include_str!("os_release/manjaro"), Distribution::Arch);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
8
src/steps/os/os_release/manjaro
Normal file
8
src/steps/os/os_release/manjaro
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
NAME="Manjaro Linux"
|
||||||
|
ID=manjaro
|
||||||
|
ID_LIKE=arch
|
||||||
|
PRETTY_NAME="Manjaro Linux"
|
||||||
|
ANSI_COLOR="1;32"
|
||||||
|
HOME_URL="https://www.manjaro.org/"
|
||||||
|
SUPPORT_URL="https://www.manjaro.org/"
|
||||||
|
BUG_REPORT_URL="https://bugs.manjaro.org/"
|
||||||
Reference in New Issue
Block a user