diff --git a/src/main.rs b/src/main.rs index 0b9edb9..9f22af5 100644 --- a/src/main.rs +++ b/src/main.rs @@ -71,6 +71,12 @@ fn main() { if let true = matches.is_present("install") { let sorted = sort(&packages, verbosity); + operations::install(sorted.repo, verbosity); + operations::aur_install(sorted.aur, verbosity); + eprintln!( + "Couldn't find packages: {} in repos or the AUR.", + sorted.nf.join(", ") + ) } } diff --git a/src/operations/aur_install.rs b/src/operations/aur_install.rs new file mode 100644 index 0000000..9389007 --- /dev/null +++ b/src/operations/aur_install.rs @@ -0,0 +1,15 @@ +pub fn aur_install(a: Vec, verbosity: i32) { + match verbosity { + 0 => {} + 1 => { + eprintln!("Installing from AUR:"); + eprintln!("{:?}", &a); + } + _ => { + eprintln!("Installing from AUR:"); + for b in a { + eprintln!("{:?}", b); + } + } + } +} diff --git a/src/operations/mod.rs b/src/operations/mod.rs index 89dda79..632a742 100644 --- a/src/operations/mod.rs +++ b/src/operations/mod.rs @@ -1,7 +1,12 @@ +mod aur_install; mod install; -mod uninstall; mod query; +mod uninstall; pub fn install(a: Vec, verbosity: i32) { install::install(a, verbosity); -} \ No newline at end of file +} + +pub fn aur_install(a: Vec, verbosity: i32) { + aur_install::aur_install(a, verbosity); +}