Add pacman-family

This commit is contained in:
Aoran Zeng 2024-08-16 04:00:36 +08:00
parent b11944f9bd
commit 5902d103f6
No known key found for this signature in database
GPG Key ID: 8F8BA8488E10ED98
5 changed files with 30 additions and 20 deletions

View File

@ -95,8 +95,10 @@ pl_clojure_setsrc (char *option)
#include "recipe/os/opensuse.c"
#include "recipe/os/arch.c"
#include "recipe/os/MSYS2.c"
#include "recipe/os/pacman-family/Arch-Linux.c"
#include "recipe/os/pacman-family/Manjaro-Linux.c"
#include "recipe/os/pacman-family/MSYS2.c"
#include "recipe/os/gentoo.c"
#include "recipe/os/alpine.c"
@ -105,22 +107,6 @@ pl_clojure_setsrc (char *option)
/**
* GUI
*/
void
os_manjaro_setsrc (char *option)
{
chsrc_ensure_root ();
char *cmd = "pacman-mirrors -i -c China -m rank";
chsrc_run (cmd, RunOpt_Default);
chsrc_run ("pacman -Syy", RunOpt_No_Last_New_Line);
chsrc_say_lastly (NULL, ChsrcTypeAuto);
}
#include "recipe/os/openwrt.c"

View File

@ -39,8 +39,6 @@ static const char
};
TargetInfo os_manjaro_target = {NULL, os_manjaro_setsrc, NULL, NULL, 0};
static const char
*os_ubuntu [] = {"ubuntu", NULL, t(&os_ubuntu_target)},
*os_linuxmint [] = {"linuxmint", "mint", NULL, t(&os_linuxmint_target)},

View File

@ -0,0 +1,26 @@
/** ------------------------------------------------------------
* SPDX-License-Identifier: GPL-3.0-or-later
* -------------------------------------------------------------
* File Authors : Heng Guo <2085471348@qq.com>
* Contributors : Nil Null <nil@null.org>
* Created On : <2023-09-06>
* Last Modified : <2024-08-16>
*
* Manjaro LinuxManjaroArch Linux
* ------------------------------------------------------------*/
/**
* GUI
*/
void
os_manjaro_setsrc (char *option)
{
chsrc_ensure_root ();
char *cmd = "pacman-mirrors -i -c China -m rank";
chsrc_run (cmd, RunOpt_Default);
chsrc_run ("pacman -Syy", RunOpt_No_Last_New_Line);
chsrc_say_lastly (NULL, ChsrcTypeAuto);
}
TargetInfo os_manjaro_target = {NULL, os_manjaro_setsrc, NULL, NULL, 0};