mirror of
https://github.com/RubyMetric/chsrc
synced 2025-12-25 11:59:54 +08:00
Update inner macro
This commit is contained in:
@@ -54,7 +54,7 @@ os_armbian_setsrc (char *option)
|
||||
|
||||
chsrc_run (cmd, RunOpt_Default);
|
||||
chsrc_run ("apt update", RunOpt_No_Last_New_Line);
|
||||
chsrc_conclude (&source, ChsrcTypeAuto);
|
||||
chsrc_conclude (&source, SetsrcType_Auto);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -64,7 +64,7 @@ os_debian_setsrc_for_deb822 (char *option)
|
||||
chsrc_run (cmd, RunOpt_Default);
|
||||
|
||||
chsrc_run ("apt update", RunOpt_No_Last_New_Line);
|
||||
chsrc_conclude (&source, ChsrcTypeAuto);
|
||||
chsrc_conclude (&source, SetsrcType_Auto);
|
||||
}
|
||||
|
||||
|
||||
@@ -103,7 +103,7 @@ os_debian_setsrc (char *option)
|
||||
|
||||
chsrc_run (cmd, RunOpt_Default);
|
||||
chsrc_run ("apt update", RunOpt_No_Last_New_Line);
|
||||
chsrc_conclude (&source, ChsrcTypeAuto);
|
||||
chsrc_conclude (&source, SetsrcType_Auto);
|
||||
}
|
||||
|
||||
def_target(os_debian);
|
||||
|
||||
@@ -52,7 +52,7 @@ os_kali_setsrc (char *option)
|
||||
|
||||
chsrc_run (cmd, RunOpt_Default);
|
||||
chsrc_run ("apt update", RunOpt_No_Last_New_Line);
|
||||
chsrc_conclude (&source, ChsrcTypeUntested);
|
||||
chsrc_conclude (&source, SetsrcType_Untested);
|
||||
}
|
||||
|
||||
def_target(os_kali);
|
||||
|
||||
@@ -39,7 +39,7 @@ os_linuxlite_setsrc (char *option)
|
||||
char *cmd = xy_strjoin (3, "sed -E -i 's@https?://.*/.*/?@", source.url, "@g' " OS_Apt_SourceList);
|
||||
|
||||
chsrc_run ("apt update", RunOpt_No_Last_New_Line);
|
||||
chsrc_conclude (&source, ChsrcTypeAuto);
|
||||
chsrc_conclude (&source, SetsrcType_Auto);
|
||||
}
|
||||
|
||||
def_target(os_linuxlite);
|
||||
|
||||
@@ -44,7 +44,7 @@ os_linuxmint_setsrc (char *option)
|
||||
|
||||
chsrc_run (cmd, RunOpt_Default);
|
||||
chsrc_run ("apt update", RunOpt_No_Last_New_Line);
|
||||
chsrc_conclude (&source, ChsrcTypeAuto);
|
||||
chsrc_conclude (&source, SetsrcType_Auto);
|
||||
chsrc_warn2 ("完成后请不要再使用 mintsources(自带的图形化软件源设置工具)进行任何操作,因为在操作后,无论是否有按“确定”,mintsources 均会覆写我们刚才换源的内容");
|
||||
}
|
||||
|
||||
|
||||
@@ -46,7 +46,7 @@ os_ros_setsrc (char *option)
|
||||
chsrc_run (cmd, RunOpt_Default);
|
||||
|
||||
chsrc_run ("apt update", RunOpt_No_Last_New_Line);
|
||||
chsrc_conclude (&source, ChsrcTypeUntested);
|
||||
chsrc_conclude (&source, SetsrcType_Untested);
|
||||
}
|
||||
|
||||
def_target_s(os_ros);
|
||||
|
||||
@@ -44,7 +44,7 @@ os_raspberrypi_setsrc (char *option)
|
||||
|
||||
chsrc_run (cmd, RunOpt_Default);
|
||||
chsrc_run ("apt update", RunOpt_No_Last_New_Line);
|
||||
chsrc_conclude (&source, ChsrcTypeUntested);
|
||||
chsrc_conclude (&source, SetsrcType_Untested);
|
||||
}
|
||||
|
||||
def_target(os_raspberrypi);
|
||||
|
||||
@@ -45,7 +45,7 @@ os_trisquel_setsrc (char *option)
|
||||
|
||||
chsrc_run (cmd, RunOpt_Default);
|
||||
chsrc_run ("apt update", RunOpt_No_Last_New_Line);
|
||||
chsrc_conclude (&source, ChsrcTypeUntested);
|
||||
chsrc_conclude (&source, SetsrcType_Untested);
|
||||
}
|
||||
|
||||
def_target(os_trisquel);
|
||||
|
||||
@@ -71,7 +71,7 @@ os_ubuntu_setsrc_for_deb822 (char *option)
|
||||
|
||||
chsrc_run (cmd, RunOpt_Default);
|
||||
chsrc_run ("apt update", RunOpt_No_Last_New_Line);
|
||||
chsrc_conclude (&source, ChsrcTypeAuto);
|
||||
chsrc_conclude (&source, SetsrcType_Auto);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -112,7 +112,7 @@ os_ubuntu_setsrc (char *option)
|
||||
|
||||
chsrc_run (cmd, RunOpt_Default);
|
||||
chsrc_run ("apt update", RunOpt_No_Last_New_Line);
|
||||
chsrc_conclude (&source, ChsrcTypeAuto);
|
||||
chsrc_conclude (&source, SetsrcType_Auto);
|
||||
}
|
||||
|
||||
def_target(os_ubuntu);
|
||||
|
||||
@@ -51,7 +51,7 @@ os_deepin_setsrc (char *option)
|
||||
|
||||
chsrc_run (cmd, RunOpt_Default);
|
||||
chsrc_run ("apt update", RunOpt_No_Last_New_Line);
|
||||
chsrc_conclude (&source, ChsrcTypeUntested);
|
||||
chsrc_conclude (&source, SetsrcType_Untested);
|
||||
}
|
||||
|
||||
def_target(os_deepin);
|
||||
|
||||
@@ -39,7 +39,7 @@ os_openkylin_setsrc (char *option)
|
||||
char *cmd = xy_strjoin (3, "sed -E -i 's@https?://.*/openkylin/?@", source.url, "@g'" OS_Apt_SourceList);
|
||||
chsrc_run (cmd, RunOpt_Default);
|
||||
chsrc_run ("apt update", RunOpt_No_Last_New_Line);
|
||||
chsrc_conclude (&source, ChsrcTypeUntested);
|
||||
chsrc_conclude (&source, SetsrcType_Untested);
|
||||
}
|
||||
|
||||
def_target(os_openkylin);
|
||||
|
||||
@@ -48,7 +48,7 @@ os_alpine_setsrc (char *option)
|
||||
chsrc_run (cmd, RunOpt_Default);
|
||||
|
||||
chsrc_run ("apk update", RunOpt_No_Last_New_Line);
|
||||
chsrc_conclude (&source, ChsrcTypeUntested);
|
||||
chsrc_conclude (&source, SetsrcType_Untested);
|
||||
}
|
||||
|
||||
def_target(os_alpine);
|
||||
|
||||
@@ -128,7 +128,7 @@ os_freebsd_setsrc (char *option)
|
||||
chsrc_overwrite_file (update, "/etc/freebsd-update.conf");
|
||||
*/
|
||||
|
||||
chsrc_conclude (&source, ChsrcTypeSemiAuto);
|
||||
chsrc_conclude (&source, SetsrcType_SemiAuto);
|
||||
}
|
||||
|
||||
def_target_s(os_freebsd);
|
||||
|
||||
@@ -58,7 +58,7 @@ os_netbsd_setsrc (char *option)
|
||||
char *url = xy_strjoin (5, source.url, arch, "/", version, "/All");
|
||||
chsrc_overwrite_file (url, "/usr/pkg/etc/pkgin/repositories.conf");
|
||||
|
||||
chsrc_conclude (&source, ChsrcTypeUntested);
|
||||
chsrc_conclude (&source, SetsrcType_Untested);
|
||||
}
|
||||
|
||||
def_target(os_netbsd);
|
||||
|
||||
@@ -47,7 +47,7 @@ os_openbsd_setsrc (char *option)
|
||||
chsrc_backup ("/etc/installurl");
|
||||
chsrc_overwrite_file (source.url, "/etc/installurl");
|
||||
|
||||
chsrc_conclude (&source, ChsrcTypeUntested);
|
||||
chsrc_conclude (&source, SetsrcType_Untested);
|
||||
}
|
||||
|
||||
def_target(os_openbsd);
|
||||
|
||||
@@ -45,7 +45,7 @@ os_gentoo_setsrc (char *option)
|
||||
char *towrite = xy_strjoin (3, "GENTOO_MIRRORS=\"https://", source.url, "gentoo\"");
|
||||
|
||||
chsrc_append_to_file (towrite, "/etc/portage/make.conf");
|
||||
chsrc_conclude (&source, ChsrcTypeUntested);
|
||||
chsrc_conclude (&source, SetsrcType_Untested);
|
||||
}
|
||||
|
||||
def_target_s(os_gentoo);
|
||||
|
||||
@@ -50,7 +50,7 @@ os_openwrt_setsrc (char *option)
|
||||
char *cmd = xy_strjoin (3, "sed -E -i 's@https?://.*downloads.openwrt.org@", source.url, "@g' " OS_OpenWRT_SourceConfig);
|
||||
|
||||
chsrc_run ("apt update", RunOpt_No_Last_New_Line);
|
||||
chsrc_conclude (&source, ChsrcTypeAuto);
|
||||
chsrc_conclude (&source, SetsrcType_Auto);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -32,7 +32,7 @@ os_solus_setsrc (char *option)
|
||||
|
||||
char *cmd = xy_2strjoin ("eopkg add-repo Solus ", source.url);
|
||||
chsrc_run (cmd, RunOpt_Default);
|
||||
chsrc_conclude (&source, ChsrcTypeAuto);
|
||||
chsrc_conclude (&source, SetsrcType_Auto);
|
||||
}
|
||||
|
||||
def_target_s(os_solus);
|
||||
|
||||
@@ -52,7 +52,7 @@ os_void_setsrc (char *option)
|
||||
|
||||
chsrc_note2 ("若报错可尝试使用以下命令:");
|
||||
say (cmd);
|
||||
chsrc_conclude (&source, ChsrcTypeUntested);
|
||||
chsrc_conclude (&source, SetsrcType_Untested);
|
||||
}
|
||||
|
||||
def_target(os_void);
|
||||
|
||||
@@ -36,7 +36,7 @@ os_almalinux_setsrc (char *option)
|
||||
|
||||
chsrc_run (cmd, RunOpt_Default);
|
||||
chsrc_run ("dnf makecache", RunOpt_No_Last_New_Line);
|
||||
chsrc_conclude (&source, ChsrcTypeAuto);
|
||||
chsrc_conclude (&source, SetsrcType_Auto);
|
||||
}
|
||||
|
||||
def_target_s(os_almalinux);
|
||||
|
||||
@@ -36,7 +36,7 @@ os_anolis_setsrc (char *option)
|
||||
|
||||
chsrc_run ("dnf makecache", RunOpt_Default);
|
||||
chsrc_run ("dnf update", RunOpt_No_Last_New_Line);
|
||||
chsrc_conclude (&source, ChsrcTypeUntested);
|
||||
chsrc_conclude (&source, SetsrcType_Untested);
|
||||
}
|
||||
|
||||
def_target_s(os_anolis);
|
||||
|
||||
@@ -60,7 +60,7 @@ os_fedora_setsrc (char *option)
|
||||
chsrc_log2 ("已新增文件 /etc/yum.repos.d/fedora-updates-modular.repo");
|
||||
|
||||
chsrc_run ("dnf makecache", RunOpt_No_Last_New_Line);
|
||||
chsrc_conclude (&source, ChsrcTypeAuto);
|
||||
chsrc_conclude (&source, SetsrcType_Auto);
|
||||
}
|
||||
|
||||
def_target_s(os_fedora);
|
||||
|
||||
@@ -67,7 +67,7 @@ os_rockylinux_setsrc (char *option)
|
||||
|
||||
chsrc_run (cmd, RunOpt_Default);
|
||||
chsrc_run ("dnf makecache", RunOpt_No_Last_New_Line);
|
||||
chsrc_conclude (&source, ChsrcTypeAuto);
|
||||
chsrc_conclude (&source, SetsrcType_Auto);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -43,7 +43,7 @@ os_openeuler_setsrc (char *option)
|
||||
chsrc_overwrite_file (towrite, OS_openEuler_SourceList);
|
||||
|
||||
chsrc_run ("dnf makecache", RunOpt_No_Last_New_Line);
|
||||
chsrc_conclude (&source, ChsrcTypeAuto);
|
||||
chsrc_conclude (&source, SetsrcType_Auto);
|
||||
}
|
||||
|
||||
def_target_s(os_openeuler);
|
||||
|
||||
@@ -75,7 +75,7 @@ os_opensuse_setsrc (char *option)
|
||||
|
||||
chsrc_run (cmd5, RunOpt_Default);
|
||||
chsrc_run (cmd6, RunOpt_Default);
|
||||
chsrc_conclude (&source, ChsrcTypeUntested);
|
||||
chsrc_conclude (&source, SetsrcType_Untested);
|
||||
}
|
||||
|
||||
def_target_s(os_opensuse);
|
||||
|
||||
@@ -91,7 +91,7 @@ os_arch_setsrc (char *option)
|
||||
{
|
||||
chsrc_run ("pacman -Syy", RunOpt_No_Last_New_Line);
|
||||
}
|
||||
chsrc_conclude (&source, ChsrcTypeAuto);
|
||||
chsrc_conclude (&source, SetsrcType_Auto);
|
||||
}
|
||||
|
||||
|
||||
@@ -124,7 +124,7 @@ os_archlinuxcn_setsrc (char *option)
|
||||
chsrc_run ("pacman -Sy archlinuxcn-keyring", RunOpt_Default);
|
||||
|
||||
chsrc_run ("pacman -Syy", RunOpt_No_Last_New_Line);
|
||||
chsrc_conclude (&source, ChsrcTypeUntested);
|
||||
chsrc_conclude (&source, SetsrcType_Untested);
|
||||
}
|
||||
#undef OS_Pacman_MirrorList
|
||||
|
||||
|
||||
@@ -47,7 +47,7 @@ os_msys2_setsrc (char *option)
|
||||
"#g\" /etc/pacman.d/mirrorlist* ");
|
||||
|
||||
chsrc_run (cmd, RunOpt_Default);
|
||||
chsrc_conclude (&source, ChsrcTypeUntested);
|
||||
chsrc_conclude (&source, SetsrcType_Untested);
|
||||
}
|
||||
|
||||
def_target_s(os_msys2);
|
||||
|
||||
@@ -20,7 +20,7 @@ os_manjaro_setsrc (char *option)
|
||||
chsrc_run (cmd, RunOpt_Default);
|
||||
|
||||
chsrc_run ("pacman -Syy", RunOpt_No_Last_New_Line);
|
||||
chsrc_conclude (NULL, ChsrcTypeAuto);
|
||||
chsrc_conclude (NULL, SetsrcType_Auto);
|
||||
}
|
||||
|
||||
TargetInfo os_manjaro_target = {NULL, os_manjaro_setsrc, NULL, NULL, 0};
|
||||
|
||||
Reference in New Issue
Block a user