mirror of
https://github.com/RubyMetric/chsrc
synced 2025-06-08 11:14:03 +08:00
parent
1182e79b46
commit
f1a0a1d22f
@ -4,7 +4,7 @@
|
|||||||
* File Authors : Aoran Zeng <ccmywish@qq.com>
|
* File Authors : Aoran Zeng <ccmywish@qq.com>
|
||||||
* Contributors : Nil Null <nil@null.org>
|
* Contributors : Nil Null <nil@null.org>
|
||||||
* Created On : <2023-08-31>
|
* Created On : <2023-08-31>
|
||||||
* Last Modified : <2024-08-15>
|
* Last Modified : <2024-11-22>
|
||||||
* ------------------------------------------------------------*/
|
* ------------------------------------------------------------*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -20,6 +20,7 @@ pl_julia_sources[] = {
|
|||||||
};
|
};
|
||||||
def_sources_n(pl_julia);
|
def_sources_n(pl_julia);
|
||||||
|
|
||||||
|
#define PL_Julia_Config "~/.julia/config/startup.jl"
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Julia的换源可以通过两种方式
|
* Julia的换源可以通过两种方式
|
||||||
@ -31,13 +32,13 @@ def_sources_n(pl_julia);
|
|||||||
void
|
void
|
||||||
pl_julia_getsrc (char *option)
|
pl_julia_getsrc (char *option)
|
||||||
{
|
{
|
||||||
chsrc_view_file ("~/.julia/config/startup.jl");
|
chsrc_view_file (PL_Julia_Config);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Julia 换源,参考:
|
* @consult
|
||||||
* 1. https://help.mirrors.cernet.edu.cn/julia/
|
* 1. https://help.mirrors.cernet.edu.cn/julia/
|
||||||
* 2. https://docs.julialang.org/en/v1/manual/command-line-interface/#Startup-file
|
* 2. https://docs.julialang.org/en/v1/manual/command-line-interface/#Startup-file
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
pl_julia_setsrc (char *option)
|
pl_julia_setsrc (char *option)
|
||||||
@ -46,8 +47,30 @@ pl_julia_setsrc (char *option)
|
|||||||
|
|
||||||
const char *towrite = xy_strjoin (3, "ENV[\"JULIA_PKG_SERVER\"] = \"", source.url, "\"");
|
const char *towrite = xy_strjoin (3, "ENV[\"JULIA_PKG_SERVER\"] = \"", source.url, "\"");
|
||||||
|
|
||||||
chsrc_append_to_file (towrite, "~/.julia/config/startup.jl");
|
chsrc_append_to_file (towrite, PL_Julia_Config);
|
||||||
|
if (CliOpt_InEnglish)
|
||||||
|
chsrc_note2 ("Written to " PL_Julia_Config);
|
||||||
|
else
|
||||||
|
chsrc_note2 ("已写入 " PL_Julia_Config);
|
||||||
chsrc_conclude (&source, SetsrcType_Untested);
|
chsrc_conclude (&source, SetsrcType_Untested);
|
||||||
}
|
}
|
||||||
|
|
||||||
def_target(pl_julia);
|
|
||||||
|
FeatInfo
|
||||||
|
pl_julia_feat (char *option)
|
||||||
|
{
|
||||||
|
FeatInfo f = {0};
|
||||||
|
|
||||||
|
f.can_get = true;
|
||||||
|
f.can_reset = false;
|
||||||
|
|
||||||
|
f.cap_locally = CanNot;
|
||||||
|
f.cap_locally_explain = NA;
|
||||||
|
f.can_english = true;
|
||||||
|
f.can_user_define = true;
|
||||||
|
|
||||||
|
f.note = NULL;
|
||||||
|
return f;
|
||||||
|
}
|
||||||
|
|
||||||
|
def_target_gsf(pl_julia);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user