Split julia out

This commit is contained in:
Aoran Zeng 2024-08-15 21:14:10 +08:00
parent 4a8a3dcb9a
commit 398350f505
No known key found for this signature in database
GPG Key ID: 8F8BA8488E10ED98
4 changed files with 56 additions and 53 deletions

View File

@ -181,20 +181,6 @@ pl_haskell_sources[] = {
{&Bfsu, "https://mirrors.bfsu.edu.cn/hackage"},
{&Nju, "https://mirror.nju.edu.cn/hackage"},
{&Ustc, "https://mirrors.ustc.edu.cn/hackage"}
},
/**
* @time 2023-09-05
* @note
*/
pl_julia_sources[] = {
{&Upstream, NULL},
{&Sjtug_Zhiyuan, "https://mirrors.sjtug.sjtu.edu.cn/julia"},
{&Pku, "https://mirrors.pku.edu.cn/julia"},
{&Nju, "https://mirror.nju.edu.cn/julia"}
};
@ -706,7 +692,6 @@ wr_tex_sources[] = {
def_sources_n(pl_clojure);
def_sources_n(pl_dotnet); def_sources_n(pl_dart); def_sources_n(pl_haskell);
def_sources_n(pl_julia);
def_sources_n(os_ubuntu); def_sources_n(os_mint);
def_sources_n(os_debian); def_sources_n(os_fedora);

View File

@ -177,43 +177,7 @@ pl_haskell_setsrc (char *option)
#include "recipe/lang/ocaml.c"
#include "recipe/lang/r.c"
/**
* Julia的换源可以通过两种方式
* 1. startup.jl
* 2. 使
*
*
*/
void
pl_julia_getsrc (char *option)
{
chsrc_view_file ("~/.julia/config/startup.jl");
}
/**
* Julia
* 1. https://help.mirrors.cernet.edu.cn/julia/
* 2. https://docs.julialang.org/en/v1/manual/command-line-interface/#Startup-file
*/
void
pl_julia_setsrc (char *option)
{
SourceInfo source;
chsrc_yield_source (pl_julia);
chsrc_confirm_source (&source);
const char *towrite = xy_strjoin (3, "ENV[\"JULIA_PKG_SERVER\"] = \"", source.url, "\"");
chsrc_append_to_file (towrite, "~/.julia/config/startup.jl");
chsrc_say_lastly (&source, ChsrcTypeUntested);
}
#include "recipe/lang/julia.c"

View File

@ -9,7 +9,6 @@
/* Begin Target Matrix */
def_target(pl_dart);
def_target(pl_julia);
def_target_noget (pl_clojure);
def_target_noget (pl_dotnet);
def_target_noget (pl_haskell);

55
src/recipe/lang/julia.c Normal file
View File

@ -0,0 +1,55 @@
/** ------------------------------------------------------------
* SPDX-License-Identifier: GPL-3.0-or-later
* -------------------------------------------------------------
* File Authors : Aoran Zeng <ccmywish@qq.com>
* Contributors : Nil Null <nil@null.org>
* Created on : <2023-08-31>
* Last modified : <2024-08-15>
* ------------------------------------------------------------*/
/**
* @time 2023-09-05
* @note
*/
static SourceInfo
pl_julia_sources[] = {
{&Upstream, NULL},
{&Sjtug_Zhiyuan, "https://mirrors.sjtug.sjtu.edu.cn/julia"},
{&Pku, "https://mirrors.pku.edu.cn/julia"},
{&Nju, "https://mirror.nju.edu.cn/julia"}
};
def_sources_n(pl_julia);
/**
* Julia的换源可以通过两种方式
* 1. startup.jl
* 2. 使
*
*
*/
void
pl_julia_getsrc (char *option)
{
chsrc_view_file ("~/.julia/config/startup.jl");
}
/**
* Julia
* 1. https://help.mirrors.cernet.edu.cn/julia/
* 2. https://docs.julialang.org/en/v1/manual/command-line-interface/#Startup-file
*/
void
pl_julia_setsrc (char *option)
{
SourceInfo source;
chsrc_yield_source (pl_julia);
chsrc_confirm_source (&source);
const char *towrite = xy_strjoin (3, "ENV[\"JULIA_PKG_SERVER\"] = \"", source.url, "\"");
chsrc_append_to_file (towrite, "~/.julia/config/startup.jl");
chsrc_say_lastly (&source, ChsrcTypeUntested);
}
def_target(pl_julia);