i18n
jan Michal 2 years ago
parent 49f23b92bd
commit 005fe8c56e
No known key found for this signature in database
GPG Key ID: CB521D73AA05EBF2

@ -20,5 +20,4 @@ pub struct Options {
pub verbosity: i32, pub verbosity: i32,
pub noconfirm: bool, pub noconfirm: bool,
pub asdeps: bool, pub asdeps: bool,
pub skippgp: bool,
} }

@ -39,12 +39,6 @@ fn main() {
.set(ArgSettings::Global) .set(ArgSettings::Global)
.help("Complete operation without prompting user"), .help("Complete operation without prompting user"),
) )
.arg(
Arg::with_name("skippgp")
.long("skippgp")
.set(ArgSettings::Global)
.help("Ignore checking PGP signatures in PKGBUILDs"),
)
.subcommand( .subcommand(
SubCommand::with_name("install") SubCommand::with_name("install")
.about( .about(
@ -139,13 +133,11 @@ fn main() {
let verbosity: i32 = matches.occurrences_of("verbose") as i32; let verbosity: i32 = matches.occurrences_of("verbose") as i32;
let noconfirm: bool = matches.is_present("noconfirm"); let noconfirm: bool = matches.is_present("noconfirm");
let skippgp: bool = matches.is_present("skippgp");
let options = Options { let options = Options {
verbosity, verbosity,
noconfirm, noconfirm,
asdeps: false, asdeps: false,
skippgp,
}; };
init(options); init(options);

@ -13,7 +13,6 @@ pub fn aur_install(a: Vec<String>, options: Options) {
let cachedir = format!("{}/.cache/ame/", env::var("HOME").unwrap()); let cachedir = format!("{}/.cache/ame/", env::var("HOME").unwrap());
let verbosity = options.verbosity; let verbosity = options.verbosity;
let noconfirm = options.noconfirm; let noconfirm = options.noconfirm;
let skippgp = options.skippgp;
if verbosity >= 1 { if verbosity >= 1 {
log(format!("Installing from AUR: {:?}", &a)); log(format!("Installing from AUR: {:?}", &a));
@ -83,7 +82,6 @@ pub fn aur_install(a: Vec<String>, options: Options) {
verbosity, verbosity,
noconfirm, noconfirm,
asdeps: true, asdeps: true,
skippgp,
}; };
if !sorted.nf.is_empty() || !md_sorted.nf.is_empty() { if !sorted.nf.is_empty() || !md_sorted.nf.is_empty() {
@ -130,16 +128,13 @@ pub fn aur_install(a: Vec<String>, options: Options) {
crate::operations::aur_install(md_sorted.aur, newopts); crate::operations::aur_install(md_sorted.aur, newopts);
} }
let mut makepkg_args = vec!["-rsic", "--needed"]; let mut makepkg_args = vec!["-rsic", "--needed", "--skippgp"];
if options.asdeps { if options.asdeps {
makepkg_args.push("--asdeps") makepkg_args.push("--asdeps")
} }
if options.noconfirm { if options.noconfirm {
makepkg_args.push("--noconfirm") makepkg_args.push("--noconfirm")
} }
if options.skippgp {
makepkg_args.push("--skippgp")
}
// package building and installing // package building and installing
info("Building time!".to_string()); info("Building time!".to_string());

Loading…
Cancel
Save