fixing stuff up

i18n
jnats 3 years ago
parent 8633544015
commit 85c02b91af

@ -1,5 +1,5 @@
use git2::Repository;
use std::{fs, env, path::Path, process::Command};
use std::{fs, path::Path, process::Command};
pub fn clone(pkg: &str) {
let cachedir = format!("{}/.cache/ame/{}", std::env::var("HOME").unwrap(), pkg);
@ -15,11 +15,11 @@ pub fn clone(pkg: &str) {
println!("Cloning {} ...", pkg);
Repository::clone(&url, &path).unwrap();
println!("Installing {} ...", pkg);
env::set_current_dir(&cachedir).expect(&error);
Command::new("makepkg")
.current_dir(&cachedir)
.arg("--noconfirm")
.arg("-si")
.spawn()
.output()
.expect(&error);
}
}

@ -5,6 +5,7 @@ pub fn uninstall(pkg: &str) {
Command::new("sudo")
.arg("pacman")
.arg("-R")
.arg("--noconfirm")
.arg(&pkg)
.spawn()
//.status() TODO: for some reason cant use both .spawn and .status at the same time, need fix

Loading…
Cancel
Save