mirror of
https://github.com/philmmanjaro/alma.git
synced 2025-07-24 22:19:28 +02:00
feat: support paru as AurHelper (#75)
This commit is contained in:
parent
dc127ed87a
commit
21e11151c8
@ -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,
|
||||
}
|
||||
|
||||
|
20
src/aur.rs
20
src/aur.rs
@ -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"),
|
||||
|
@ -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"];
|
||||
|
Loading…
x
Reference in New Issue
Block a user