Use chsrc_view_env()

This commit is contained in:
Aoran Zeng 2025-06-19 14:17:27 +08:00
parent a978659696
commit 7d0923e9de
No known key found for this signature in database
GPG Key ID: 8F8BA8488E10ED98
4 changed files with 11 additions and 37 deletions

View File

@ -7,7 +7,7 @@
* |
* Created On : <2023-09-10>
* Major Revision : 2
* Last Modified : <2025-04-15>
* Last Modified : <2025-06-19>
*
* 2024-09-14: Dart和Flutter拆分为两个Target
* 3 Dart Flutter URL模式都不一样
@ -39,18 +39,7 @@ def_sources_n(pl_dart_flutter);
void
pl_dart_flutter_getsrc (char *option)
{
char *cmd = 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);
}
chsrc_view_env ("FLUTTER_STORAGE_BASE_URL", NULL);
}

View File

@ -7,7 +7,7 @@
* |
* Created On : <2023-09-10>
* Major Revision : 3
* Last Modified : <2025-04-15>
* Last Modified : <2025-06-19>
*
* Dart Pub
* ------------------------------------------------------------*/
@ -35,18 +35,7 @@ def_sources_n(pl_dart);
void
pl_dart_getsrc (char *option)
{
char *cmd = 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);
}
chsrc_view_env ("PUB_HOSTED_URL", NULL);
}
/**

View File

@ -5,7 +5,7 @@
* Contributors : Nul None <nul@none.org>
* |
* Created On : <2024-09-23>
* Last Modified : <2025-06-16>
* Last Modified : <2025-06-19>
* ------------------------------------------------------------*/
/**
@ -14,8 +14,7 @@
void
pl_nodejs_nvm_getsrc (char *option)
{
char *cmd = "echo $NVM_NODEJS_ORG_MIRROR";
chsrc_run (cmd, RunOpt_Dont_Notify_On_Success|RunOpt_No_Last_New_Line);
chsrc_view_env ("NVM_NODEJS_ORG_MIRROR", NULL);
}

View File

@ -1,12 +1,12 @@
/** ------------------------------------------------------------
* SPDX-License-Identifier: GPL-3.0-or-later
* -------------------------------------------------------------
* File Authors : Aoran Zeng <ccmywish@qq.com>
* Contributors : Yangmoooo <yangmoooo@outlook.com>
* | Mikachu2333 <mikachu.23333@zohomail.com>
* File Authors : Aoran Zeng <ccmywish@qq.com>
* Contributors : Yangmoooo <yangmoooo@outlook.com>
* | Mikachu2333 <mikachu.23333@zohomail.com>
* |
* Created On : <2024-10-02>
* Last Modified : <2025-06-17>
* Last Modified : <2025-06-19>
* ------------------------------------------------------------*/
static SourceProvider_t pl_rust_binary_upstream =
@ -38,10 +38,7 @@ def_sources_n(pl_rust_rustup);
void
pl_rust_rustup_getsrc (char *option)
{
char *cmd = "echo $RUSTUP_UPDATE_ROOT; "
"echo $RUSTUP_DIST_SERVER;";
chsrc_run (cmd, RunOpt_Dont_Notify_On_Success|RunOpt_No_Last_New_Line);
chsrc_view_env ("RUSTUP_UPDATE_ROOT", "RUSTUP_DIST_SERVER", NULL);
}