diff --git a/src/recipe/os/openSUSE.c b/src/recipe/os/openSUSE.c index 0461fd4..c0819e5 100644 --- a/src/recipe/os/openSUSE.c +++ b/src/recipe/os/openSUSE.c @@ -5,7 +5,7 @@ * Contributors : Aoran Zeng * Created On : <2023-09-17> * Major Revision : 1 - * Last Modified : <2025-07-22> + * Last Modified : <2025-08-09> * ------------------------------------------------------------*/ /** @@ -36,7 +36,7 @@ def_sources_n(os_opensuse); void os_opensuse_setsrc (char *option) { - chsrc_ensure_root (); + // chsrc_ensure_root (); chsrc_yield_source_and_confirm (os_opensuse); @@ -61,12 +61,14 @@ os_opensuse_setsrc (char *option) } if (choice == 1) { - chsrc_run_as_bash_file (RAWSTR_os_openSUSE_leap_in_bash); + char *script = xy_str_gsub (RAWSTR_os_openSUSE_leap_in_bash, "@url@", source.url); + chsrc_run_as_bash_file (script); break; } if (choice == 2) { - chsrc_run_as_bash_file (RAWSTR_os_openSUSE_tumbleweed_in_bash); + char *script = xy_str_gsub (RAWSTR_os_openSUSE_tumbleweed_in_bash, "@url@", source.url); + chsrc_run_as_bash_file (script); break; } else diff --git a/src/recipe/os/rawstr4c.h b/src/recipe/os/rawstr4c.h index a37885f..06bc0a4 100644 --- a/src/recipe/os/rawstr4c.h +++ b/src/recipe/os/rawstr4c.h @@ -6,5 +6,5 @@ char RAWSTR_os_openSUSE_leap_in_bash[] = "\x23\x20\xe9\xa6\x96\xe5\x85\x88\xe7\xa6\x81\xe7\x94\xa8\xe5\xae\x98\xe6\x96\xb9\xe8\xbd\xaf\xe4\xbb\xb6\xe6\xba\x90\x0a\x7a\x79\x70\x70\x65\x72\x20\x6d\x72\x20\x2d\x64\x61\x0a\x0a\x7a\x79\x70\x70\x65\x72\x20\x61\x72\x20\x2d\x63\x66\x67\x20\x27\x40\x75\x72\x6c\x40\x2f\x64\x69\x73\x74\x72\x69\x62\x75\x74\x69\x6f\x6e\x2f\x6c\x65\x61\x70\x2f\x24\x72\x65\x6c\x65\x61\x73\x65\x76\x65\x72\x2f\x72\x65\x70\x6f\x2f\x6f\x73\x73\x2f\x27\x20\x6d\x69\x72\x72\x6f\x72\x2d\x6f\x73\x73\x0a\x7a\x79\x70\x70\x65\x72\x20\x61\x72\x20\x2d\x63\x66\x67\x20\x27\x40\x75\x72\x6c\x40\x2f\x64\x69\x73\x74\x72\x69\x62\x75\x74\x69\x6f\x6e\x2f\x6c\x65\x61\x70\x2f\x24\x72\x65\x6c\x65\x61\x73\x65\x76\x65\x72\x2f\x72\x65\x70\x6f\x2f\x6e\x6f\x6e\x2d\x6f\x73\x73\x2f\x27\x20\x6d\x69\x72\x72\x6f\x72\x2d\x6e\x6f\x6e\x2d\x6f\x73\x73\x0a\x7a\x79\x70\x70\x65\x72\x20\x61\x72\x20\x2d\x63\x66\x67\x20\x27\x40\x75\x72\x6c\x40\x2f\x75\x70\x64\x61\x74\x65\x2f\x6c\x65\x61\x70\x2f\x24\x72\x65\x6c\x65\x61\x73\x65\x76\x65\x72\x2f\x6f\x73\x73\x2f\x27\x20\x6d\x69\x72\x72\x6f\x72\x2d\x75\x70\x64\x61\x74\x65\x0a\x7a\x79\x70\x70\x65\x72\x20\x61\x72\x20\x2d\x63\x66\x67\x20\x27\x40\x75\x72\x6c\x40\x2f\x75\x70\x64\x61\x74\x65\x2f\x6c\x65\x61\x70\x2f\x24\x72\x65\x6c\x65\x61\x73\x65\x76\x65\x72\x2f\x6e\x6f\x6e\x2d\x6f\x73\x73\x2f\x27\x20\x6d\x69\x72\x72\x6f\x72\x2d\x75\x70\x64\x61\x74\x65\x2d\x6e\x6f\x6e\x2d\x6f\x73\x73\x0a\x0a\x7a\x79\x70\x70\x65\x72\x20\x61\x72\x20\x2d\x63\x66\x67\x20\x27\x40\x75\x72\x6c\x40\x2f\x75\x70\x64\x61\x74\x65\x2f\x6c\x65\x61\x70\x2f\x24\x72\x65\x6c\x65\x61\x73\x65\x76\x65\x72\x2f\x73\x6c\x65\x2f\x27\x20\x6d\x69\x72\x72\x6f\x72\x2d\x73\x6c\x65\x2d\x75\x70\x64\x61\x74\x65\x0a\x7a\x79\x70\x70\x65\x72\x20\x61\x72\x20\x2d\x63\x66\x67\x20\x27\x40\x75\x72\x6c\x40\x2f\x75\x70\x64\x61\x74\x65\x2f\x6c\x65\x61\x70\x2f\x24\x72\x65\x6c\x65\x61\x73\x65\x76\x65\x72\x2f\x62\x61\x63\x6b\x70\x6f\x72\x74\x73\x2f\x27\x20\x6d\x69\x72\x72\x6f\x72\x2d\x62\x61\x63\x6b\x70\x6f\x72\x74\x73\x2d\x75\x70\x64\x61\x74\x65"; -char RAWSTR_os_openSUSE_tumbleweed_in_bash[] = "\x23\x20\xe9\xa6\x96\xe5\x85\x88\xe7\xa6\x81\xe7\x94\xa8\xe5\xae\x98\xe6\x96\xb9\xe8\xbd\xaf\xe4\xbb\xb6\xe6\xba\x90\x0a\x7a\x79\x70\x70\x65\x72\x20\x6d\x72\x20\x2d\x64\x61\x0a\x0a\x7a\x79\x70\x70\x65\x72\x20\x61\x72\x20\x2d\x63\x66\x67\x20\x27\x68\x74\x74\x70\x73\x3a\x2f\x2f\x6d\x69\x72\x72\x6f\x72\x73\x2e\x74\x75\x6e\x61\x2e\x74\x73\x69\x6e\x67\x68\x75\x61\x2e\x65\x64\x75\x2e\x63\x6e\x2f\x6f\x70\x65\x6e\x73\x75\x73\x65\x2f\x74\x75\x6d\x62\x6c\x65\x77\x65\x65\x64\x2f\x72\x65\x70\x6f\x2f\x6f\x73\x73\x2f\x27\x20\x6d\x69\x72\x72\x6f\x72\x2d\x6f\x73\x73\x0a\x7a\x79\x70\x70\x65\x72\x20\x61\x72\x20\x2d\x63\x66\x67\x20\x27\x68\x74\x74\x70\x73\x3a\x2f\x2f\x6d\x69\x72\x72\x6f\x72\x73\x2e\x74\x75\x6e\x61\x2e\x74\x73\x69\x6e\x67\x68\x75\x61\x2e\x65\x64\x75\x2e\x63\x6e\x2f\x6f\x70\x65\x6e\x73\x75\x73\x65\x2f\x74\x75\x6d\x62\x6c\x65\x77\x65\x65\x64\x2f\x72\x65\x70\x6f\x2f\x6e\x6f\x6e\x2d\x6f\x73\x73\x2f\x27\x20\x6d\x69\x72\x72\x6f\x72\x2d\x6e\x6f\x6e\x2d\x6f\x73\x73\x0a\x0a\x23\x20\xe5\x88\xb7\xe6\x96\xb0\xe8\xbd\xaf\xe4\xbb\xb6\xe6\xba\x90\x0a\x7a\x79\x70\x70\x65\x72\x20\x72\x65\x66"; +char RAWSTR_os_openSUSE_tumbleweed_in_bash[] = "\x23\x20\xe9\xa6\x96\xe5\x85\x88\xe7\xa6\x81\xe7\x94\xa8\xe5\xae\x98\xe6\x96\xb9\xe8\xbd\xaf\xe4\xbb\xb6\xe6\xba\x90\x0a\x7a\x79\x70\x70\x65\x72\x20\x6d\x72\x20\x2d\x64\x61\x0a\x0a\x7a\x79\x70\x70\x65\x72\x20\x61\x72\x20\x2d\x63\x66\x67\x20\x27\x40\x75\x72\x6c\x40\x2f\x74\x75\x6d\x62\x6c\x65\x77\x65\x65\x64\x2f\x72\x65\x70\x6f\x2f\x6f\x73\x73\x2f\x27\x20\x6d\x69\x72\x72\x6f\x72\x2d\x6f\x73\x73\x0a\x7a\x79\x70\x70\x65\x72\x20\x61\x72\x20\x2d\x63\x66\x67\x20\x27\x40\x75\x72\x6c\x40\x2f\x74\x75\x6d\x62\x6c\x65\x77\x65\x65\x64\x2f\x72\x65\x70\x6f\x2f\x6e\x6f\x6e\x2d\x6f\x73\x73\x2f\x27\x20\x6d\x69\x72\x72\x6f\x72\x2d\x6e\x6f\x6e\x2d\x6f\x73\x73\x0a\x0a\x23\x20\xe5\x88\xb7\xe6\x96\xb0\xe8\xbd\xaf\xe4\xbb\xb6\xe6\xba\x90\x0a\x7a\x79\x70\x70\x65\x72\x20\x72\x65\x66"; diff --git a/src/recipe/os/rawstr4c.md b/src/recipe/os/rawstr4c.md index 2742a31..ab3f201 100644 --- a/src/recipe/os/rawstr4c.md +++ b/src/recipe/os/rawstr4c.md @@ -5,7 +5,7 @@ ! Config Authors: Aoran Zeng ! Contributors : Nil Null ! Created On : <2025-07-21> - ! Last Modified : <2025-07-21> + ! Last Modified : <2025-08-09> ! ---------------------------------------------------------- --> # rawstr4c input for OS @@ -43,8 +43,8 @@ zypper ar -cfg '@url@/update/leap/$releasever/backports/' mirror-backports-updat # 首先禁用官方软件源 zypper mr -da -zypper ar -cfg 'https://mirrors.tuna.tsinghua.edu.cn/opensuse/tumbleweed/repo/oss/' mirror-oss -zypper ar -cfg 'https://mirrors.tuna.tsinghua.edu.cn/opensuse/tumbleweed/repo/non-oss/' mirror-non-oss +zypper ar -cfg '@url@/tumbleweed/repo/oss/' mirror-oss +zypper ar -cfg '@url@/tumbleweed/repo/non-oss/' mirror-non-oss # 刷新软件源 zypper ref