Added podman suppport. Updated README.md to reflect new container types supported.
This commit is contained in:
parent
0f1fd1a958
commit
5b5894be85
2 changed files with 55 additions and 0 deletions
|
@ -31,7 +31,9 @@ Trusted contributors will count as a passed/failed contributor test.
|
||||||
|
|
||||||
|CONTAINER TYPE|PERSONALLY TESTED|CONTRIBUTOR TESTED|
|
|CONTAINER TYPE|PERSONALLY TESTED|CONTRIBUTOR TESTED|
|
||||||
| :-- | :-- | :-- |
|
| :-- | :-- | :-- |
|
||||||
|
|Distrobox|yes|no|
|
||||||
|Flatpak|yes|no|
|
|Flatpak|yes|no|
|
||||||
|
|Podman|yes|no|
|
||||||
|Snap|yes|no|
|
|Snap|yes|no|
|
||||||
|
|
||||||
|OTHER TOOLS|PERSONALLY TESTED|CONTRIBUTOR TESTED|
|
|OTHER TOOLS|PERSONALLY TESTED|CONTRIBUTOR TESTED|
|
||||||
|
|
|
@ -74,6 +74,11 @@ fn main() {
|
||||||
let mut distrobox_upgrade_bin = String::from_utf8(find_distrobox_upgrade.stdout).unwrap();
|
let mut distrobox_upgrade_bin = String::from_utf8(find_distrobox_upgrade.stdout).unwrap();
|
||||||
trim_newline(&mut distrobox_upgrade_bin);
|
trim_newline(&mut distrobox_upgrade_bin);
|
||||||
|
|
||||||
|
let find_podman = Command::new("which")
|
||||||
|
.arg("podman").stdout(Stdio::piped()).output().unwrap();
|
||||||
|
let mut podman_bin = String::from_utf8(find_podman.stdout).unwrap();
|
||||||
|
trim_newline(&mut podman_bin);
|
||||||
|
|
||||||
//apt
|
//apt
|
||||||
let path = Path::new(&apt_bin);
|
let path = Path::new(&apt_bin);
|
||||||
if path.exists(){
|
if path.exists(){
|
||||||
|
@ -223,5 +228,53 @@ fn main() {
|
||||||
.spawn().unwrap();
|
.spawn().unwrap();
|
||||||
let _output = cmd.wait();
|
let _output = cmd.wait();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//Podman system
|
||||||
|
let path = Path::new(&podman_bin);
|
||||||
|
if path.exists(){
|
||||||
|
cprintln!("<bold><rev>Updating Podman system containers</rev></bold>");
|
||||||
|
let mut cmd =
|
||||||
|
Command::new(&sudo_bin)
|
||||||
|
.arg(&podman_bin).arg("auto-update")
|
||||||
|
.stdout(Stdio::inherit()).stderr(Stdio::inherit())
|
||||||
|
.spawn().unwrap();
|
||||||
|
let _output = cmd.wait();
|
||||||
|
}
|
||||||
|
|
||||||
|
//Podman user
|
||||||
|
let path = Path::new(&podman_bin);
|
||||||
|
if path.exists(){
|
||||||
|
cprintln!("<bold><rev>Updating Podman user containers</rev></bold>");
|
||||||
|
let mut cmd =
|
||||||
|
Command::new(&podman_bin)
|
||||||
|
.arg("auto-update")
|
||||||
|
.stdout(Stdio::inherit()).stderr(Stdio::inherit())
|
||||||
|
.spawn().unwrap();
|
||||||
|
let _output = cmd.wait();
|
||||||
|
}
|
||||||
|
|
||||||
|
//Podman system prune
|
||||||
|
let path = Path::new(&podman_bin);
|
||||||
|
if path.exists(){
|
||||||
|
cprintln!("<bold><rev>Pruning Podman system containers</rev></bold>");
|
||||||
|
let mut cmd =
|
||||||
|
Command::new(&sudo_bin)
|
||||||
|
.arg(&podman_bin).arg("system").arg("prune").arg("-af")
|
||||||
|
.stdout(Stdio::inherit()).stderr(Stdio::inherit())
|
||||||
|
.spawn().unwrap();
|
||||||
|
let _output = cmd.wait();
|
||||||
|
}
|
||||||
|
|
||||||
|
//Podman user prune
|
||||||
|
let path = Path::new(&podman_bin);
|
||||||
|
if path.exists(){
|
||||||
|
cprintln!("<bold><rev>Pruning Podman user containers</rev></bold>");
|
||||||
|
let mut cmd =
|
||||||
|
Command::new(&podman_bin)
|
||||||
|
.arg("system").arg("prune").arg("-af")
|
||||||
|
.stdout(Stdio::inherit()).stderr(Stdio::inherit())
|
||||||
|
.spawn().unwrap();
|
||||||
|
let _output = cmd.wait();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue