feat: support paru as AurHelper (#75)

This commit is contained in:
EdJoPaTo 2021-11-14 20:59:24 +01:00 committed by Philip Mueller
parent dc127ed87a
commit 21e11151c8
3 changed files with 20 additions and 3 deletions

View File

@ -84,7 +84,7 @@ pub struct CreateCommand {
#[structopt(long = "allow-non-removable")]
pub allow_non_removable: bool,
#[structopt(long = "aur-helper", possible_values=&["yay"], default_value="yay")]
#[structopt(long = "aur-helper", possible_values=&["paru", "yay"], default_value="yay")]
pub aur_helper: AurHelper,
}

View File

@ -12,6 +12,25 @@ impl FromStr for AurHelper {
fn from_str(s: &str) -> anyhow::Result<Self> {
match s {
"paru" => Ok(Self {
name: String::from("paru"),
package_name: String::from("paru-bin"),
install_command: vec![
String::from("paru"),
String::from("-S"),
String::from("--skipreview"),
String::from("--noupgrademenu"),
String::from("--useask"),
String::from("--removemake"),
String::from("--norebuild"),
String::from("--nocleanafter"),
String::from("--noredownload"),
String::from("--mflags"),
String::from(""),
String::from("--noconfirm"),
String::from("--batchinstall"),
],
}),
"yay" => Ok(Self {
name: String::from("yay"),
package_name: String::from("yay-bin"),
@ -25,7 +44,6 @@ impl FromStr for AurHelper {
String::from("--useask"),
String::from("--removemake"),
String::from("--norebuild"),
String::from("--noconfirm"),
String::from("--answeredit"),
String::from("None"),
String::from("--answerclean"),

View File

@ -9,5 +9,4 @@ SystemMaxUse=16M
pub const BASE_PACKAGES: [&str; 1] = ["base"];
// we add go so that it is cached when installing yay
pub const AUR_DEPENDENCIES: [&str; 3] = ["base-devel", "git", "sudo"];