pkg_manager

Crates.iopkg_manager
lib.rspkg_manager
version0.1.1
sourcesrc
created_at2022-04-12 20:01:18.230055
updated_at2022-04-12 20:02:22.196614
descriptionWrapper to Linux Package Managers
homepage
repository
max_upload_size
id566602
size6,549
buzz (Pietro222222)

documentation

README

Pkg Manager

pkg manager is a crate that provides a user friendly wrapper to linux package managers.

Support Package Managers

there are currently 2 supported package managers, apt and pacman

what can i do?

with this crate, you can install and remove packages!

Starting

use pkg_manager::PkgWrapper;
fn main() {
    let pkg = PkgWrapper::new(); //will autodetect your package manager
} 

Installing Packages

use pkg_manager::PkgWrapper;
fn main() {
    let pkg = PkgWrapper::new(true).unwrap(); //will autodetect your package manager, takes a boolean as argument (no_confirm)
    pkg.install_pkg("pkgname").unwrap();
} 

Uninstalling Packages

use pkg_manager::PkgWrapper;
fn main() {
    let pkg = PkgWrapper::new(true).unwrap(); //will autodetect your package manager, takes a boolean as argument (no_confirm)
    pkg.uninstall_pkg("pkgname").unwrap();
} 
Commit count: 0

cargo fmt