mirror of
https://github.com/RubyMetric/chsrc.git
synced 2025-03-09 20:15:17 +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
|
||||
},
|
||||
**os_packagers[] = {
|
||||
os_ubuntu,
|
||||
os_ubuntu
|
||||
};
|
||||
// static const char const
|
||||
// *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];
|
||||
int k = 0;
|
||||
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) {
|
||||
// printf("%s matched: %s\n",target, alias);
|
||||
if (0==strcmp(target, alias)) {
|
||||
|
2
chsrc.h
2
chsrc.h
@ -56,9 +56,9 @@ pl_ruby_sources[] = {
|
||||
|
||||
static source_info
|
||||
pl_ubuntu_sources[] = {
|
||||
{&Ali, "https://mirrors.aliyun.com/ubuntu/"},
|
||||
{&Bfsu, "https://mirrors.bfsu.edu.cn/ubuntu/"},
|
||||
{&Ustc, "https://mirrors.ustc.edu.cn/ubuntu/"},
|
||||
{&Ali, "https://mirrors.aliyun.com/ubuntu/"},
|
||||
{&Tuna, "https://mirrors.tuna.tsinghua.edu.cn/ubuntu/"},
|
||||
{&Tencent, "https://mirrors.tencent.com/ubuntu/"},
|
||||
{&Wy, "https://mirrors.163.com/ubuntu/"},
|
||||
|
Loading…
x
Reference in New Issue
Block a user