mirror of
https://github.com/RubyMetric/chsrc.git
synced 2025-02-02 18:03:18 +08:00
Split julia out
This commit is contained in:
parent
4a8a3dcb9a
commit
398350f505
|
@ -181,20 +181,6 @@ pl_haskell_sources[] = {
|
||||||
{&Bfsu, "https://mirrors.bfsu.edu.cn/hackage"},
|
{&Bfsu, "https://mirrors.bfsu.edu.cn/hackage"},
|
||||||
{&Nju, "https://mirror.nju.edu.cn/hackage"},
|
{&Nju, "https://mirror.nju.edu.cn/hackage"},
|
||||||
{&Ustc, "https://mirrors.ustc.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_clojure);
|
||||||
def_sources_n(pl_dotnet); def_sources_n(pl_dart); def_sources_n(pl_haskell);
|
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_ubuntu); def_sources_n(os_mint);
|
||||||
def_sources_n(os_debian); def_sources_n(os_fedora);
|
def_sources_n(os_debian); def_sources_n(os_fedora);
|
||||||
|
|
38
src/chsrc.c
38
src/chsrc.c
|
@ -177,43 +177,7 @@ pl_haskell_setsrc (char *option)
|
||||||
|
|
||||||
#include "recipe/lang/ocaml.c"
|
#include "recipe/lang/ocaml.c"
|
||||||
#include "recipe/lang/r.c"
|
#include "recipe/lang/r.c"
|
||||||
|
#include "recipe/lang/julia.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);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -9,7 +9,6 @@
|
||||||
|
|
||||||
/* Begin Target Matrix */
|
/* Begin Target Matrix */
|
||||||
def_target(pl_dart);
|
def_target(pl_dart);
|
||||||
def_target(pl_julia);
|
|
||||||
def_target_noget (pl_clojure);
|
def_target_noget (pl_clojure);
|
||||||
def_target_noget (pl_dotnet);
|
def_target_noget (pl_dotnet);
|
||||||
def_target_noget (pl_haskell);
|
def_target_noget (pl_haskell);
|
||||||
|
|
55
src/recipe/lang/julia.c
Normal file
55
src/recipe/lang/julia.c
Normal 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);
|
Loading…
Reference in New Issue
Block a user