mirror of
https://github.com/RubyMetric/chsrc.git
synced 2025-03-10 04:25:16 +08:00
Add os_ubuntu to package and test OK
This commit is contained in:
parent
60fdd4932b
commit
d0e0d1ca6c
22
chsrc.c
22
chsrc.c
@ -128,7 +128,7 @@ static const char const
|
|||||||
pl_rust, pl_go, pl_dotnet, pl_maven, pl_gradle, pl_julia
|
pl_rust, pl_go, pl_dotnet, pl_maven, pl_gradle, pl_julia
|
||||||
},
|
},
|
||||||
**os_packagers[] = {
|
**os_packagers[] = {
|
||||||
os_ubuntu,
|
os_ubuntu
|
||||||
};
|
};
|
||||||
// static const char const
|
// static const char const
|
||||||
// *os_ubuntu[] = {"ubuntu", NULL, cmdfunc(os_ubuntu_chsrc)};
|
// *os_ubuntu[] = {"ubuntu", NULL, cmdfunc(os_ubuntu_chsrc)};
|
||||||
@ -204,6 +204,26 @@ main (int argc, char const *argv[])
|
|||||||
const char const** packager = pl_packagers[i];
|
const char const** packager = pl_packagers[i];
|
||||||
int k = 0;
|
int k = 0;
|
||||||
const char* alias = packager[k];
|
const char* alias = packager[k];
|
||||||
|
while (NULL!=alias) {
|
||||||
|
printf("%s matched: %s\n",target, alias);
|
||||||
|
if (0==strcmp(target, alias)) {
|
||||||
|
// printf("matched: %s\n", alias);
|
||||||
|
matched = 1; break;
|
||||||
|
}
|
||||||
|
k++;
|
||||||
|
alias = packager[k];
|
||||||
|
}
|
||||||
|
if (matched) {
|
||||||
|
do {
|
||||||
|
k++; alias = packager[k];
|
||||||
|
} while (NULL!=alias);
|
||||||
|
call_cmd ((void*) packager[k+1], cmdarg);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
for (int i=0; i<Array_Size(os_packagers); i++) {
|
||||||
|
const char const** packager = os_packagers[i];
|
||||||
|
int k = 0;
|
||||||
|
const char* alias = packager[k];
|
||||||
while (NULL!=alias) {
|
while (NULL!=alias) {
|
||||||
// printf("%s matched: %s\n",target, alias);
|
// printf("%s matched: %s\n",target, alias);
|
||||||
if (0==strcmp(target, alias)) {
|
if (0==strcmp(target, alias)) {
|
||||||
|
2
chsrc.h
2
chsrc.h
@ -56,9 +56,9 @@ pl_ruby_sources[] = {
|
|||||||
|
|
||||||
static source_info
|
static source_info
|
||||||
pl_ubuntu_sources[] = {
|
pl_ubuntu_sources[] = {
|
||||||
|
{&Ali, "https://mirrors.aliyun.com/ubuntu/"},
|
||||||
{&Bfsu, "https://mirrors.bfsu.edu.cn/ubuntu/"},
|
{&Bfsu, "https://mirrors.bfsu.edu.cn/ubuntu/"},
|
||||||
{&Ustc, "https://mirrors.ustc.edu.cn/ubuntu/"},
|
{&Ustc, "https://mirrors.ustc.edu.cn/ubuntu/"},
|
||||||
{&Ali, "https://mirrors.aliyun.com/ubuntu/"},
|
|
||||||
{&Tuna, "https://mirrors.tuna.tsinghua.edu.cn/ubuntu/"},
|
{&Tuna, "https://mirrors.tuna.tsinghua.edu.cn/ubuntu/"},
|
||||||
{&Tencent, "https://mirrors.tencent.com/ubuntu/"},
|
{&Tencent, "https://mirrors.tencent.com/ubuntu/"},
|
||||||
{&Wy, "https://mirrors.163.com/ubuntu/"},
|
{&Wy, "https://mirrors.163.com/ubuntu/"},
|
||||||
|
Loading…
x
Reference in New Issue
Block a user