Compare commits

..

No commits in common. "main" and "v0.2.2" have entirely different histories.
main ... v0.2.2

3 changed files with 20 additions and 34 deletions

View File

@ -31,12 +31,12 @@
* | Rui Yang <techoc@foxmail.com> * | Rui Yang <techoc@foxmail.com>
* | * |
* Created On : <2023-08-28> * Created On : <2023-08-28>
* Last Modified : <2025-07-28> * Last Modified : <2025-07-26>
* *
* chsrc: Change Source * chsrc: Change Source
* ------------------------------------------------------------*/ * ------------------------------------------------------------*/
#define Chsrc_Version "0.2.2.1-dev1" #define Chsrc_Version "0.2.2"
#define Chsrc_Release_Date "2025/07/26" #define Chsrc_Release_Date "2025/07/26"
#define Chsrc_Maintain_URL "https://github.com/RubyMetric/chsrc" #define Chsrc_Maintain_URL "https://github.com/RubyMetric/chsrc"
#define Chsrc_Maintain_URL2 "https://gitee.com/RubyMetric/chsrc" #define Chsrc_Maintain_URL2 "https://gitee.com/RubyMetric/chsrc"

View File

@ -9,7 +9,7 @@
* | Yangmoooo <yangmoooo@outlook.com> * | Yangmoooo <yangmoooo@outlook.com>
* | * |
* Created On : <2023-08-29> * Created On : <2023-08-29>
* Last Modified : <2025-07-28> * Last Modified : <2025-07-22>
* *
* chsrc framework * chsrc framework
* ------------------------------------------------------------*/ * ------------------------------------------------------------*/
@ -1347,7 +1347,7 @@ chsrc_make_tmpfile (char *filename, char *postfix, bool loud, char **tmpfilename
char *tmpfile = xy_strjoin (3, "chsrc_tmp_", filename, postfix); char *tmpfile = xy_strjoin (3, "chsrc_tmp_", filename, postfix);
FILE *f = fopen (tmpfile, "w+"); FILE *f = fopen (tmpfile, "w+");
#else #else
char *tmpfile = xy_strjoin (5, "/tmp/", "chsrc_tmp_", filename, "_XXXXXX", postfix); char *tmpfile = xy_strjoin (4, "/tmp/", "chsrc_tmp_", filename, "_XXXXXX", postfix);
size_t postfix_len = strlen (postfix); size_t postfix_len = strlen (postfix);
/* 和 _mktemp_s() 参数不同,前者是整个缓存区大小,这里的长度是后缀长度 */ /* 和 _mktemp_s() 参数不同,前者是整个缓存区大小,这里的长度是后缀长度 */
@ -1402,7 +1402,7 @@ chsrc_run_as_bash_file (const char *script_content)
// chmod (tmpfile, 0700); // chmod (tmpfile, 0700);
char *msg = CHINESE ? "即将执行 Bash 脚本内容:" : "The Bash script content will be executed:"; char *msg = CHINESE ? "即将执行 Bash 脚本内容:" : "The Bash script content will be executed:";
chsrc_note2 (msg); chsrc_note2 (msg);
println (faint(script_content)); print (faint(script_content));
char *cmd = xy_2strjoin ("bash ", tmpfile); char *cmd = xy_2strjoin ("bash ", tmpfile);
chsrc_run (cmd, RunOpt_Dont_Abort_On_Failure); chsrc_run (cmd, RunOpt_Dont_Abort_On_Failure);
remove (tmpfile); remove (tmpfile);
@ -1422,7 +1422,7 @@ chsrc_run_as_sh_file (const char *script_content)
// chmod (tmpfile, 0700); // chmod (tmpfile, 0700);
char *msg = CHINESE ? "即将执行 sh 脚本内容:" : "The sh script content will be executed:"; char *msg = CHINESE ? "即将执行 sh 脚本内容:" : "The sh script content will be executed:";
chsrc_note2 (msg); chsrc_note2 (msg);
println (faint(script_content)); print (faint(script_content));
char *cmd = xy_2strjoin ("sh ", tmpfile); char *cmd = xy_2strjoin ("sh ", tmpfile);
chsrc_run (cmd, RunOpt_Dont_Abort_On_Failure); chsrc_run (cmd, RunOpt_Dont_Abort_On_Failure);
remove (tmpfile); remove (tmpfile);
@ -1441,7 +1441,7 @@ chsrc_run_as_pwsh_file (const char *script_content)
fclose (f); fclose (f);
char *msg = CHINESE ? "即将执行 PowerShell 脚本内容:" : "The PowerShell script content will be executed:"; char *msg = CHINESE ? "即将执行 PowerShell 脚本内容:" : "The PowerShell script content will be executed:";
chsrc_note2 (msg); chsrc_note2 (msg);
println (faint(script_content)); print (faint(script_content));
char *cmd = xy_2strjoin ("pwsh ", tmpfile); char *cmd = xy_2strjoin ("pwsh ", tmpfile);
chsrc_run (cmd, RunOpt_Dont_Abort_On_Failure); chsrc_run (cmd, RunOpt_Dont_Abort_On_Failure);
remove (tmpfile); remove (tmpfile);

View File

@ -1,42 +1,28 @@
/** ------------------------------------------------------------ /** ------------------------------------------------------------
* SPDX-License-Identifier: GPL-3.0-or-later * SPDX-License-Identifier: GPL-3.0-or-later
* ------------------------------------------------------------- * -------------------------------------------------------------
* File Authors : Aoran Zeng <ccmywish@qq.com> * File Authors : Aoran Zeng <ccmywish@qq.com>
* Contributors : Mikachu2333 <mikachu.23333@zohomail.com> * Contributors : Nil Null <nil@null.org>
* Created On : <2023-09-10> * Created On : <2023-09-10>
* Last Modified : <2025-07-28> * Last Modified : <2025-07-13>
* *
* MiKTeX TeX Live LaTeX * MiKTeX TeX Live LaTeX
* ------------------------------------------------------------*/ * ------------------------------------------------------------*/
/** /**
* @update 2025-07-28 * @update 2025-07-13
*/ */
static Source_t wr_tex_sources[] = static Source_t wr_tex_sources[] =
{ {
{&UpstreamProvider, NULL, NULL}, {&UpstreamProvider, NULL, NULL},
{&MirrorZ, "https://mirrors.cernet.edu.cn/CTAN/systems/texlive/tlnet", NULL}, {&MirrorZ, "https://mirrors.cernet.edu.cn/CTAN/systems/texlive/tlnet", NULL},
{&Sjtug_Zhiyuan, "https://mirrors.sjtug.sjtu.edu.cn/ctan/systems/texlive/tlnet", NULL},
{&Sjtug_Zhiyuan, "https://mirrors.sjtug.sjtu.edu.cn/ctan/systems/texlive/tlnet", {&Tuna, "https://mirrors.tuna.tsinghua.edu.cn/CTAN/systems/texlive/tlnet", NULL},
"https://mirrors.sustech.edu.cn/CTAN/systems/texlive/tlnet/archive/fandol.tar.xz"}, {&Bfsu, "https://mirrors.bfsu.edu.cn/CTAN/systems/texlive/tlnet", NULL},
{&Bjtu, "https://mirror.bjtu.edu.cn/ctan/systems/texlive/tlnet", NULL},
{&Tuna, "https://mirrors.tuna.tsinghua.edu.cn/CTAN/systems/texlive/tlnet", {&Lzuoss, "https://mirror.lzu.edu.cn/CTAN/systems/texlive/tlnet", NULL},
"https://mirrors.tuna.tsinghua.edu.cn/CTAN/systems/texlive/tlnet/archive/fandol.tar.xz"}, {&Jlu, "https://mirrors.jlu.edu.cn/CTAN/systems/texlive/tlnet", NULL},
{&Sustech, "https://mirrors.sustech.edu.cn/CTAN/systems/texlive/tlnet", NULL}
{&Bfsu, "https://mirrors.bfsu.edu.cn/CTAN/systems/texlive/tlnet",
"https://mirrors.bfsu.edu.cn/CTAN/systems/texlive/tlnet/archive/fandol.tar.xz"},
{&Bjtu, "https://mirror.bjtu.edu.cn/ctan/systems/texlive/tlnet",
"https://mirror.bjtu.edu.cn/ctan/systems/texlive/tlnet/archive/fandol.tar.xz"},
{&Lzuoss, "https://mirror.lzu.edu.cn/CTAN/systems/texlive/tlnet",
"https://mirror.lzu.edu.cn/CTAN/systems/texlive/tlnet/archive/fandol.tar.xz"},
{&Jlu, "https://mirrors.jlu.edu.cn/CTAN/systems/texlive/tlnet",
"https://mirrors.jlu.edu.cn/CTAN/systems/texlive/tlnet/archive/fandol.tar.xz"},
{&Sustech, "https://mirrors.sustech.edu.cn/CTAN/systems/texlive/tlnet",
"https://mirrors.sustech.edu.cn/CTAN/systems/texlive/tlnet/archive/fandol.tar.xz"}
}; };
def_sources_n(wr_tex); def_sources_n(wr_tex);