mirror of
https://github.com/RubyMetric/chsrc
synced 2025-06-26 14:42:46 +08:00
Use chsrc_view_env()
This commit is contained in:
parent
a978659696
commit
7d0923e9de
@ -7,7 +7,7 @@
|
|||||||
* |
|
* |
|
||||||
* Created On : <2023-09-10>
|
* Created On : <2023-09-10>
|
||||||
* Major Revision : 2
|
* Major Revision : 2
|
||||||
* Last Modified : <2025-04-15>
|
* Last Modified : <2025-06-19>
|
||||||
*
|
*
|
||||||
* 2024-09-14: 不得不将Dart和Flutter拆分为两个Target,
|
* 2024-09-14: 不得不将Dart和Flutter拆分为两个Target,
|
||||||
* 因为3家教育网镜像站给出的 Dart 和 Flutter 换源URL模式都不一样
|
* 因为3家教育网镜像站给出的 Dart 和 Flutter 换源URL模式都不一样
|
||||||
@ -39,18 +39,7 @@ def_sources_n(pl_dart_flutter);
|
|||||||
void
|
void
|
||||||
pl_dart_flutter_getsrc (char *option)
|
pl_dart_flutter_getsrc (char *option)
|
||||||
{
|
{
|
||||||
char *cmd = NULL;
|
chsrc_view_env ("FLUTTER_STORAGE_BASE_URL", NULL);
|
||||||
if (xy_on_windows)
|
|
||||||
{
|
|
||||||
// cmd = "set PUB_HOSTED_URL & set FLUTTER_STORAGE_BASE_URL";
|
|
||||||
cmd = "set FLUTTER_STORAGE_BASE_URL";
|
|
||||||
chsrc_run (cmd, RunOpt_No_Last_New_Line);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
cmd = "echo $FLUTTER_STORAGE_BASE_URL";
|
|
||||||
chsrc_run (cmd, RunOpt_No_Last_New_Line);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
* |
|
* |
|
||||||
* Created On : <2023-09-10>
|
* Created On : <2023-09-10>
|
||||||
* Major Revision : 3
|
* Major Revision : 3
|
||||||
* Last Modified : <2025-04-15>
|
* Last Modified : <2025-06-19>
|
||||||
*
|
*
|
||||||
* Dart Pub 软件仓库
|
* Dart Pub 软件仓库
|
||||||
* ------------------------------------------------------------*/
|
* ------------------------------------------------------------*/
|
||||||
@ -35,18 +35,7 @@ def_sources_n(pl_dart);
|
|||||||
void
|
void
|
||||||
pl_dart_getsrc (char *option)
|
pl_dart_getsrc (char *option)
|
||||||
{
|
{
|
||||||
char *cmd = NULL;
|
chsrc_view_env ("PUB_HOSTED_URL", NULL);
|
||||||
if (xy_on_windows)
|
|
||||||
{
|
|
||||||
// cmd = "set PUB_HOSTED_URL & set FLUTTER_STORAGE_BASE_URL";
|
|
||||||
cmd = "set PUB_HOSTED_URL";
|
|
||||||
chsrc_run (cmd, RunOpt_Default);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
cmd = "echo $PUB_HOSTED_URL";
|
|
||||||
chsrc_run (cmd, RunOpt_Default);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
* Contributors : Nul None <nul@none.org>
|
* Contributors : Nul None <nul@none.org>
|
||||||
* |
|
* |
|
||||||
* Created On : <2024-09-23>
|
* Created On : <2024-09-23>
|
||||||
* Last Modified : <2025-06-16>
|
* Last Modified : <2025-06-19>
|
||||||
* ------------------------------------------------------------*/
|
* ------------------------------------------------------------*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -14,8 +14,7 @@
|
|||||||
void
|
void
|
||||||
pl_nodejs_nvm_getsrc (char *option)
|
pl_nodejs_nvm_getsrc (char *option)
|
||||||
{
|
{
|
||||||
char *cmd = "echo $NVM_NODEJS_ORG_MIRROR";
|
chsrc_view_env ("NVM_NODEJS_ORG_MIRROR", NULL);
|
||||||
chsrc_run (cmd, RunOpt_Dont_Notify_On_Success|RunOpt_No_Last_New_Line);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,12 +1,12 @@
|
|||||||
/** ------------------------------------------------------------
|
/** ------------------------------------------------------------
|
||||||
* 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 : Yangmoooo <yangmoooo@outlook.com>
|
* Contributors : Yangmoooo <yangmoooo@outlook.com>
|
||||||
* | Mikachu2333 <mikachu.23333@zohomail.com>
|
* | Mikachu2333 <mikachu.23333@zohomail.com>
|
||||||
* |
|
* |
|
||||||
* Created On : <2024-10-02>
|
* Created On : <2024-10-02>
|
||||||
* Last Modified : <2025-06-17>
|
* Last Modified : <2025-06-19>
|
||||||
* ------------------------------------------------------------*/
|
* ------------------------------------------------------------*/
|
||||||
|
|
||||||
static SourceProvider_t pl_rust_binary_upstream =
|
static SourceProvider_t pl_rust_binary_upstream =
|
||||||
@ -38,10 +38,7 @@ def_sources_n(pl_rust_rustup);
|
|||||||
void
|
void
|
||||||
pl_rust_rustup_getsrc (char *option)
|
pl_rust_rustup_getsrc (char *option)
|
||||||
{
|
{
|
||||||
char *cmd = "echo $RUSTUP_UPDATE_ROOT; "
|
chsrc_view_env ("RUSTUP_UPDATE_ROOT", "RUSTUP_DIST_SERVER", NULL);
|
||||||
"echo $RUSTUP_DIST_SERVER;";
|
|
||||||
|
|
||||||
chsrc_run (cmd, RunOpt_Dont_Notify_On_Success|RunOpt_No_Last_New_Line);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user