mirror of
https://github.com/RubyMetric/chsrc.git
synced 2025-01-22 21:02:59 +08:00
Add pacman-family
This commit is contained in:
parent
b11944f9bd
commit
5902d103f6
22
src/chsrc.c
22
src/chsrc.c
|
@ -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"
|
||||
|
||||
|
||||
|
|
|
@ -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)},
|
||||
|
|
26
src/recipe/os/pacman-family/Manjaro-Linux.c
Normal file
26
src/recipe/os/pacman-family/Manjaro-Linux.c
Normal 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 Linux(或简称Manjaro)基于Arch 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};
|
Loading…
Reference in New Issue
Block a user