diff --git a/src/recipe/lang/Clojure.c b/src/recipe/lang/Clojure.c index 1f52d59..105b5c6 100644 --- a/src/recipe/lang/Clojure.c +++ b/src/recipe/lang/Clojure.c @@ -7,8 +7,7 @@ def_target(pl_clojure, "clojure/clojars/cloj/lein"); void pl_clojure_prelude () { - use_this(pl_clojure); - chef_allow_s(pl_clojure); + chef_prep_this (pl_clojure, s); chef_set_created_on (this, "2023-09-10"); chef_set_last_updated (this, "2025-08-10"); diff --git a/src/recipe/lang/Dart/Flutter.c b/src/recipe/lang/Dart/Flutter.c index ae04192..6363bc3 100644 --- a/src/recipe/lang/Dart/Flutter.c +++ b/src/recipe/lang/Dart/Flutter.c @@ -7,8 +7,7 @@ def_target(pl_dart_flutter, "flutter"); void pl_dart_flutter_prelude (void) { - use_this(pl_dart_flutter); - chef_allow_gsr(pl_dart_flutter); + chef_prep_this (pl_dart_flutter, gsr); chef_set_created_on (this, "2023-09-10"); chef_set_last_updated (this, "2025-07-11"); diff --git a/src/recipe/lang/Dart/Pub.c b/src/recipe/lang/Dart/Pub.c index fa3990f..99117e3 100644 --- a/src/recipe/lang/Dart/Pub.c +++ b/src/recipe/lang/Dart/Pub.c @@ -7,8 +7,7 @@ def_target(pl_dart, "dart/pub"); void pl_dart_prelude (void) { - use_this(pl_dart); - chef_allow_gsr(pl_dart); + chef_prep_this (pl_dart, gsr); chef_set_created_on (this, "2023-09-10"); chef_set_last_updated (this, "2025-07-11"); diff --git a/src/recipe/lang/Go.c b/src/recipe/lang/Go.c index f1b9ae4..7cc5edc 100644 --- a/src/recipe/lang/Go.c +++ b/src/recipe/lang/Go.c @@ -21,8 +21,7 @@ def_target(pl_go, "go/golang/goproxy"); void pl_go_prelude () { - use_this(pl_go); - chef_allow_gsr(pl_go); + chef_prep_this (pl_go, gsr); chef_set_created_on (this, "2023-08-30"); chef_set_last_updated (this, "2025-08-10"); diff --git a/src/recipe/lang/Haskell.c b/src/recipe/lang/Haskell.c index 4e8f901..7231432 100644 --- a/src/recipe/lang/Haskell.c +++ b/src/recipe/lang/Haskell.c @@ -7,8 +7,7 @@ def_target(pl_haskell, "haskell/cabal/stack/hackage"); void pl_haskell_prelude () { - use_this(pl_haskell); - chef_allow_s(pl_haskell); + chef_prep_this (pl_haskell, s); chef_set_created_on (this, "2023-09-10"); chef_set_last_updated (this, "2025-08-10"); diff --git a/src/recipe/lang/Java.c b/src/recipe/lang/Java.c index f00a9fb..548700d 100644 --- a/src/recipe/lang/Java.c +++ b/src/recipe/lang/Java.c @@ -7,8 +7,7 @@ def_target(pl_java, "java/maven/mvn/gradle"); void pl_java_prelude () { - use_this(pl_java); - chef_allow_gsr(pl_java); + chef_prep_this (pl_java, gsr); chef_set_created_on (this, "2023-08-31"); chef_set_last_updated (this, "2025-08-10"); diff --git a/src/recipe/lang/JavaScript/Bun.c b/src/recipe/lang/JavaScript/Bun.c index 394c22f..6bcdff0 100644 --- a/src/recipe/lang/JavaScript/Bun.c +++ b/src/recipe/lang/JavaScript/Bun.c @@ -7,8 +7,7 @@ def_target(pl_js_bun, "bun"); void pl_js_bun_prelude (void) { - use_this(pl_js_bun); - chef_allow_gsr(pl_js_bun); + chef_prep_this (pl_js_bun, gsr); chef_set_created_on (this, "2024-09-29"); chef_set_last_updated (this, "2025-07-22"); diff --git a/src/recipe/lang/JavaScript/JavaScript.c b/src/recipe/lang/JavaScript/JavaScript.c index 9fd6dbf..235c17c 100644 --- a/src/recipe/lang/JavaScript/JavaScript.c +++ b/src/recipe/lang/JavaScript/JavaScript.c @@ -70,8 +70,7 @@ pl_js_group_setsrc (char *option) chsrc_set_target_group_mode (); - use_this(pl_js_group); - Source_t source = chsrc_yield_source_and_confirm (this, option); + use_this_source (pl_js_group); if (npm_exist) { diff --git a/src/recipe/lang/JavaScript/Yarn.c b/src/recipe/lang/JavaScript/Yarn.c index 8c4c1a2..62d06fc 100644 --- a/src/recipe/lang/JavaScript/Yarn.c +++ b/src/recipe/lang/JavaScript/Yarn.c @@ -7,8 +7,7 @@ def_target(pl_js_yarn, "yarn"); void pl_js_yarn_prelude (void) { - use_this(pl_js_yarn); - chef_allow_gsr(pl_js_yarn); + chef_prep_this (pl_js_yarn, gsr); chef_set_created_on (this, "2023-09-09"); chef_set_last_updated (this, "2025-07-11"); diff --git a/src/recipe/lang/JavaScript/common.h b/src/recipe/lang/JavaScript/common.h index 830d51f..ec40cca 100644 --- a/src/recipe/lang/JavaScript/common.h +++ b/src/recipe/lang/JavaScript/common.h @@ -14,8 +14,7 @@ def_target(pl_js_group, "js/javascript/node/nodejs"); void pl_js_group_prelude (void) { - use_this(pl_js_group); - chef_allow_gsr(pl_js_group); + chef_prep_this (pl_js_group, gsr); chef_set_created_on (this, "2023-09-09"); chef_set_last_updated (this, "2025-07-11"); @@ -51,8 +50,7 @@ def_target(pl_js_nodejs_binary, "__internal_use_nodejs_binary__"); void pl_js_nodejs_binary_prelude (void) { - use_this(pl_js_nodejs_binary); - chef_allow_gsr(pl_js_group); + chef_prep_this (pl_js_nodejs_binary, NOOP); chef_set_created_on (this, "2023-09-09"); chef_set_last_updated (this, "2025-07-11"); diff --git a/src/recipe/lang/JavaScript/npm.c b/src/recipe/lang/JavaScript/npm.c index 93d5b8e..d40477b 100644 --- a/src/recipe/lang/JavaScript/npm.c +++ b/src/recipe/lang/JavaScript/npm.c @@ -7,8 +7,7 @@ def_target(pl_js_npm, "npm"); void pl_js_npm_prelude (void) { - use_this(pl_js_npm); - chef_allow_gsr(pl_js_npm); + chef_prep_this (pl_js_npm, gsr); chef_set_created_on (this, "2023-08-30"); chef_set_last_updated (this, "2025-07-11"); diff --git a/src/recipe/lang/JavaScript/nvm.c b/src/recipe/lang/JavaScript/nvm.c index 9586f38..5ae2206 100644 --- a/src/recipe/lang/JavaScript/nvm.c +++ b/src/recipe/lang/JavaScript/nvm.c @@ -7,8 +7,7 @@ def_target(pl_js_nvm, "nvm"); void pl_js_nvm_prelude (void) { - use_this(pl_js_nvm); - chef_allow_gsr(pl_js_nvm); + chef_prep_this (pl_js_nvm, gsr); chef_set_created_on (this, "2024-09-23"); chef_set_last_updated (this, "2025-06-19"); diff --git a/src/recipe/lang/JavaScript/pnpm.c b/src/recipe/lang/JavaScript/pnpm.c index bba23aa..847b1d9 100644 --- a/src/recipe/lang/JavaScript/pnpm.c +++ b/src/recipe/lang/JavaScript/pnpm.c @@ -7,8 +7,7 @@ def_target(pl_js_pnpm, "pnpm"); void pl_js_pnpm_prelude (void) { - use_this(pl_js_pnpm); - chef_allow_gsr(pl_js_pnpm); + chef_prep_this (pl_js_pnpm, gsr); chef_set_created_on (this, "2024-04-18"); chef_set_last_updated (this, "2025-07-11"); diff --git a/src/recipe/lang/Julia.c b/src/recipe/lang/Julia.c index 2e6374b..539e6af 100644 --- a/src/recipe/lang/Julia.c +++ b/src/recipe/lang/Julia.c @@ -7,8 +7,7 @@ def_target(pl_julia, "julia"); void pl_julia_prelude () { - use_this(pl_julia); - chef_allow_gs(pl_julia); + chef_prep_this (pl_julia, gs); chef_set_created_on (this, "2023-08-31"); chef_set_last_updated (this, "2025-08-10"); diff --git a/src/recipe/lang/Lua.c b/src/recipe/lang/Lua.c index e116e76..7f943d4 100644 --- a/src/recipe/lang/Lua.c +++ b/src/recipe/lang/Lua.c @@ -14,8 +14,7 @@ def_target(pl_lua, "lua/luarocks"); void pl_lua_prelude () { - use_this(pl_lua); - chef_allow_gs(pl_lua); + chef_prep_this (pl_lua, gs); chef_set_created_on (this, "2023-09-27"); chef_set_last_updated (this, "2025-08-10"); @@ -49,8 +48,7 @@ pl_lua_getsrc (char *option) void pl_lua_setsrc (char *option) { - use_this(pl_lua); - Source_t source = chsrc_yield_source_and_confirm (this, option); + use_this_source (pl_lua); char *config = xy_strcat (3, "rocks_servers = {\n" " \"", source.url, "\"\n" diff --git a/src/recipe/lang/NuGet.c b/src/recipe/lang/NuGet.c index 68b574c..c67a725 100644 --- a/src/recipe/lang/NuGet.c +++ b/src/recipe/lang/NuGet.c @@ -7,8 +7,7 @@ def_target(pl_nuget, "nuget/net/.net/dotnet"); void pl_nuget_prelude () { - use_this(pl_nuget); - chef_allow_gs(pl_nuget); + chef_prep_this (pl_nuget, gs); chef_set_created_on (this, "2023-09-10"); chef_set_last_updated (this, "2025-08-10"); diff --git a/src/recipe/lang/OCaml.c b/src/recipe/lang/OCaml.c index f57344c..6da10ba 100644 --- a/src/recipe/lang/OCaml.c +++ b/src/recipe/lang/OCaml.c @@ -7,8 +7,7 @@ def_target(pl_ocaml, "ocaml/opam"); void pl_ocaml_prelude () { - use_this(pl_ocaml); - chef_allow_gs(pl_ocaml); + chef_prep_this (pl_ocaml, gs); chef_set_created_on (this, "2023-09-15"); chef_set_last_updated (this, "2025-08-10"); diff --git a/src/recipe/lang/PHP.c b/src/recipe/lang/PHP.c index 1805362..339b8a2 100644 --- a/src/recipe/lang/PHP.c +++ b/src/recipe/lang/PHP.c @@ -7,8 +7,7 @@ def_target(pl_php, "php/composer"); void pl_php_prelude () { - use_this(pl_php); - chef_allow_gs(pl_php); + chef_prep_this (pl_php, gs); chef_set_created_on (this, "2023-08-30"); chef_set_last_updated (this, "2025-08-10"); @@ -56,8 +55,7 @@ pl_php_setsrc (char *option) { pl_php_check_cmd (); - use_this(pl_php); - Source_t source = chsrc_yield_source_and_confirm (this, option); + use_this_source (pl_php); char *where = " -g "; if (chsrc_in_local_mode()) diff --git a/src/recipe/lang/Perl.c b/src/recipe/lang/Perl.c index c7d6cbd..efbb7a2 100644 --- a/src/recipe/lang/Perl.c +++ b/src/recipe/lang/Perl.c @@ -7,8 +7,7 @@ def_target(pl_perl, "perl/cpan"); void pl_perl_prelude () { - use_this(pl_perl); - chef_allow_gs(pl_perl); + chef_prep_this (pl_perl, gs); chef_set_created_on (this, "2023-09-31"); chef_set_last_updated (this, "2025-08-10"); diff --git a/src/recipe/lang/Python/PDM.c b/src/recipe/lang/Python/PDM.c index bc35f74..44fc6ff 100644 --- a/src/recipe/lang/Python/PDM.c +++ b/src/recipe/lang/Python/PDM.c @@ -7,8 +7,7 @@ def_target(pl_python_pdm, "pdm"); void pl_python_pdm_prelude (void) { - use_this(pl_python_pdm); - chef_allow_gsr(pl_python_pdm); + chef_prep_this (pl_python_pdm, gsr); chef_set_created_on (this, "2024-06-05"); chef_set_last_updated (this, "2025-07-11"); @@ -22,9 +21,6 @@ pl_python_pdm_prelude (void) chef_allow_english(this); chef_allow_user_define(this); - // 使用 pl_python_group 的源 - this->sources = pl_python_group_target.sources; - this->sources_n = pl_python_group_target.sources_n; } diff --git a/src/recipe/lang/Python/Poetry.c b/src/recipe/lang/Python/Poetry.c index b9c4412..7d2008b 100644 --- a/src/recipe/lang/Python/Poetry.c +++ b/src/recipe/lang/Python/Poetry.c @@ -7,8 +7,7 @@ def_target(pl_python_poetry, "poetry"); void pl_python_poetry_prelude (void) { - use_this(pl_python_poetry); - chef_allow_gsr(pl_python_poetry); + chef_prep_this (pl_python_poetry, gsr); chef_set_created_on (this, "2024-08-08"); chef_set_last_updated (this, "2025-07-11"); diff --git a/src/recipe/lang/Python/Python.c b/src/recipe/lang/Python/Python.c index 6a4b439..0e4b4e5 100644 --- a/src/recipe/lang/Python/Python.c +++ b/src/recipe/lang/Python/Python.c @@ -58,8 +58,7 @@ pl_python_group_setsrc (char *option) chsrc_set_target_group_mode (); - use_this(pl_python_group); - Source_t source = chsrc_yield_source_and_confirm (this, option); + use_this_source (pl_python_group); // 交给后面检查命令的存在性 diff --git a/src/recipe/lang/Python/Rye.c b/src/recipe/lang/Python/Rye.c index 9bc258a..d1472e2 100644 --- a/src/recipe/lang/Python/Rye.c +++ b/src/recipe/lang/Python/Rye.c @@ -9,8 +9,7 @@ def_target(pl_python_rye, "rye"); void pl_python_rye_prelude (void) { - use_this(pl_python_rye); - chef_allow_gsr(pl_python_rye); + chef_prep_this (pl_python_rye, gsr); chef_set_created_on (this, "2024-12-06"); chef_set_last_updated (this, "2025-08-09"); diff --git a/src/recipe/lang/Python/common.h b/src/recipe/lang/Python/common.h index bdb2641..5cbf712 100644 --- a/src/recipe/lang/Python/common.h +++ b/src/recipe/lang/Python/common.h @@ -22,8 +22,7 @@ pl_python_speed_url_constructor (const char *url, const char *user_data) void pl_python_group_prelude (void) { - use_this(pl_python_group); - chef_allow_gsr(pl_python_group); + chef_prep_this (pl_python_group, gsr); chef_set_created_on (this, "2023-09-03"); chef_set_last_updated (this, "2025-07-14"); @@ -73,7 +72,7 @@ pl_python_check_unofficial_pkger (bool *poetry_exist, bool *pdm_exist, bool *uv_ /** - * @param[out] prog 返回 Python 的可用名,如果不可用,则返回 NULL + * @param[out] prog_name 返回 Python 的可用名,如果不可用,则返回 NULL */ void pl_python_get_py_program_name (char **prog_name) diff --git a/src/recipe/lang/Python/pip.c b/src/recipe/lang/Python/pip.c index bda3465..318f712 100644 --- a/src/recipe/lang/Python/pip.c +++ b/src/recipe/lang/Python/pip.c @@ -7,8 +7,7 @@ def_target(pl_python_pip, "pip"); void pl_python_pip_prelude (void) { - use_this(pl_python_pip); - chef_allow_gsr(pl_python_pip); + chef_prep_this (pl_python_pip, gsr); chef_set_created_on (this, "2023-09-03"); chef_set_last_updated (this, "2025-07-11"); diff --git a/src/recipe/lang/Python/uv.c b/src/recipe/lang/Python/uv.c index e81fb3b..f2f89e8 100644 --- a/src/recipe/lang/Python/uv.c +++ b/src/recipe/lang/Python/uv.c @@ -7,8 +7,7 @@ def_target(pl_python_uv, "uv"); void pl_python_uv_prelude (void) { - use_this(pl_python_uv); - chef_allow_gsr(pl_python_uv); + chef_prep_this (pl_python_uv, gsr); chef_set_created_on (this, "2024-12-11"); chef_set_last_updated (this, "2025-08-09"); diff --git a/src/recipe/lang/R.c b/src/recipe/lang/R.c index 0530a56..f6d625d 100644 --- a/src/recipe/lang/R.c +++ b/src/recipe/lang/R.c @@ -7,8 +7,7 @@ def_target(pl_r, "r/cran"); void pl_r_prelude () { - use_this(pl_r); - chef_allow_gs(pl_r); + chef_prep_this (pl_r, gs); chef_set_created_on (this, "2023-09-21"); chef_set_last_updated (this, "2025-08-10"); diff --git a/src/recipe/lang/Ruby/Ruby.c b/src/recipe/lang/Ruby/Ruby.c index aa6033a..065e025 100644 --- a/src/recipe/lang/Ruby/Ruby.c +++ b/src/recipe/lang/Ruby/Ruby.c @@ -14,8 +14,7 @@ def_target(pl_ruby, "gem/ruby/rb/rubygem/rubygems/bundler"); void pl_ruby_prelude (void) { - use_this(pl_ruby); - chef_allow_gsr(pl_ruby); + chef_prep_this (pl_ruby, gsr); chef_set_created_on (this, "2023-08-29"); chef_set_last_updated (this, "2025-08-11"); diff --git a/src/recipe/lang/Rust/Cargo.c b/src/recipe/lang/Rust/Cargo.c index 3a074a4..68afe0a 100644 --- a/src/recipe/lang/Rust/Cargo.c +++ b/src/recipe/lang/Rust/Cargo.c @@ -7,8 +7,7 @@ def_target(pl_rust_cargo, "rust/cargo/crate/crates"); void pl_rust_cargo_prelude (void) { - use_this(pl_rust_cargo); - chef_allow_gsr(pl_rust_cargo); + chef_prep_this (pl_rust_cargo, gsr); chef_set_created_on (this, "2023-08-30"); chef_set_last_updated (this, "2025-07-22"); diff --git a/src/recipe/lang/Rust/rustup.c b/src/recipe/lang/Rust/rustup.c index a81a75b..bebb773 100644 --- a/src/recipe/lang/Rust/rustup.c +++ b/src/recipe/lang/Rust/rustup.c @@ -10,8 +10,7 @@ def_target(pl_rust_rustup, "rustup"); void pl_rust_rustup_prelude (void) { - use_this(pl_rust_rustup); - chef_allow_gsr(pl_rust_rustup); + chef_prep_this (pl_rust_rustup, gsr); chef_set_created_on (this, "2024-10-02"); chef_set_last_updated (this, "2025-08-07"); diff --git a/src/recipe/os/APT/Armbian.c b/src/recipe/os/APT/Armbian.c index f0728e8..573022b 100644 --- a/src/recipe/os/APT/Armbian.c +++ b/src/recipe/os/APT/Armbian.c @@ -7,8 +7,7 @@ def_target(os_armbian, "armbian"); void os_armbian_prelude () { - use_this(os_armbian); - chef_allow_gsr(os_armbian); + chef_prep_this (os_armbian, gsr); chef_set_created_on (this, "2024-06-14"); chef_set_last_updated (this, "2025-08-10"); diff --git a/src/recipe/os/APT/Debian.c b/src/recipe/os/APT/Debian.c index 6a998f0..8a8ebcc 100644 --- a/src/recipe/os/APT/Debian.c +++ b/src/recipe/os/APT/Debian.c @@ -7,8 +7,7 @@ def_target(os_debian, "debian"); void os_debian_prelude () { - use_this(os_debian); - chef_allow_gsr(os_debian); + chef_prep_this (os_debian, gsr); chef_set_created_on (this, "2023-09-02"); chef_set_last_updated (this, "2025-08-10"); diff --git a/src/recipe/os/APT/Kali-Linux.c b/src/recipe/os/APT/Kali-Linux.c index 9b5232e..15a0e14 100644 --- a/src/recipe/os/APT/Kali-Linux.c +++ b/src/recipe/os/APT/Kali-Linux.c @@ -7,8 +7,7 @@ def_target(os_kali, "kali"); void os_kali_prelude () { - use_this(os_kali); - chef_allow_gsr(os_kali); + chef_prep_this (os_kali, gsr); chef_set_created_on (this, "2023-09-29"); chef_set_last_updated (this, "2025-08-10"); diff --git a/src/recipe/os/APT/Linux-Lite.c b/src/recipe/os/APT/Linux-Lite.c index 857cfa8..997992c 100644 --- a/src/recipe/os/APT/Linux-Lite.c +++ b/src/recipe/os/APT/Linux-Lite.c @@ -7,8 +7,7 @@ def_target(os_linuxlite, "linuxlite"); void os_linuxlite_prelude () { - use_this(os_linuxlite); - chef_allow_gsr(os_linuxlite); + chef_prep_this (os_linuxlite, gsr); chef_set_created_on (this, "2023-09-29"); chef_set_last_updated (this, "2025-08-10"); diff --git a/src/recipe/os/APT/Linux-Mint.c b/src/recipe/os/APT/Linux-Mint.c index a012c51..6f51882 100644 --- a/src/recipe/os/APT/Linux-Mint.c +++ b/src/recipe/os/APT/Linux-Mint.c @@ -7,8 +7,7 @@ def_target(os_linuxmint, "linuxmint"); void os_linuxmint_prelude () { - use_this(os_linuxmint); - chef_allow_gs(os_linuxmint); + chef_prep_this (os_linuxmint, gs); chef_set_created_on (this, "2023-09-29"); chef_set_last_updated (this, "2025-08-10"); diff --git a/src/recipe/os/APT/ROS.c b/src/recipe/os/APT/ROS.c index df1cdc9..618d247 100644 --- a/src/recipe/os/APT/ROS.c +++ b/src/recipe/os/APT/ROS.c @@ -7,8 +7,7 @@ def_target(os_ros, "ros/ros2"); void os_ros_prelude () { - use_this(os_ros); - chef_allow_gs(os_ros); + chef_prep_this (os_ros, gs); chef_set_created_on (this, "2023-09-03"); chef_set_last_updated (this, "2025-08-10"); diff --git a/src/recipe/os/APT/Raspberry-Pi-OS.c b/src/recipe/os/APT/Raspberry-Pi-OS.c index 1e38150..c52cb49 100644 --- a/src/recipe/os/APT/Raspberry-Pi-OS.c +++ b/src/recipe/os/APT/Raspberry-Pi-OS.c @@ -9,8 +9,7 @@ def_target(os_raspberrypi, "raspi/raspberrypi"); void os_raspberrypi_prelude () { - use_this(os_raspberrypi); - chef_allow_gsr(os_raspberrypi); + chef_prep_this (os_raspberrypi, gsr); chef_set_created_on (this, "2023-09-29"); chef_set_last_updated (this, "2025-08-10"); diff --git a/src/recipe/os/APT/Termux.c b/src/recipe/os/APT/Termux.c index 08dd935..bdceded 100644 --- a/src/recipe/os/APT/Termux.c +++ b/src/recipe/os/APT/Termux.c @@ -7,8 +7,7 @@ def_target(os_termux, "termux"); void os_termux_prelude () { - use_this(os_termux); - chef_allow_gsr(os_termux); + chef_prep_this (os_termux, gsr); chef_set_created_on (this, "2025-03-04"); chef_set_last_updated (this, "2025-08-10"); diff --git a/src/recipe/os/APT/Trisquel.c b/src/recipe/os/APT/Trisquel.c index 935ba60..c162724 100644 --- a/src/recipe/os/APT/Trisquel.c +++ b/src/recipe/os/APT/Trisquel.c @@ -9,8 +9,7 @@ def_target(os_trisquel, "trisquel"); void os_trisquel_prelude () { - use_this(os_trisquel); - chef_allow_gsr(os_trisquel); + chef_prep_this (os_trisquel, gsr); chef_set_created_on (this, "2023-09-29"); chef_set_last_updated (this, "2025-08-10"); diff --git a/src/recipe/os/APT/Ubuntu.c b/src/recipe/os/APT/Ubuntu.c index 8895d6f..92f5400 100644 --- a/src/recipe/os/APT/Ubuntu.c +++ b/src/recipe/os/APT/Ubuntu.c @@ -8,8 +8,7 @@ def_target(os_ubuntu, "ubuntu/zorinos"); void os_ubuntu_prelude () { - use_this(os_ubuntu); - chef_allow_gsr(os_ubuntu); + chef_prep_this (os_ubuntu, gsr); chef_set_created_on (this, "2023-08-30"); chef_set_last_updated (this, "2025-08-10"); diff --git a/src/recipe/os/APT/deepin.c b/src/recipe/os/APT/deepin.c index 95da89e..ab094d4 100644 --- a/src/recipe/os/APT/deepin.c +++ b/src/recipe/os/APT/deepin.c @@ -7,8 +7,7 @@ def_target(os_deepin, "deepin"); void os_deepin_prelude () { - use_this(os_deepin); - chef_allow_gsr(os_deepin); + chef_prep_this (os_deepin, gsr); chef_set_created_on (this, "2023-09-26"); chef_set_last_updated (this, "2025-08-10"); diff --git a/src/recipe/os/APT/openKylin.c b/src/recipe/os/APT/openKylin.c index 742669b..625d1f0 100644 --- a/src/recipe/os/APT/openKylin.c +++ b/src/recipe/os/APT/openKylin.c @@ -10,8 +10,7 @@ def_target(os_openkylin, "openkylin"); void os_openkylin_prelude () { - use_this(os_openkylin); - chef_allow_gsr(os_openkylin); + chef_prep_this (os_openkylin, gsr); chef_set_created_on (this, "2023-09-06"); chef_set_last_updated (this, "2025-08-10"); diff --git a/src/recipe/os/Alpine-Linux.c b/src/recipe/os/Alpine-Linux.c index 82ac21d..657a76c 100644 --- a/src/recipe/os/Alpine-Linux.c +++ b/src/recipe/os/Alpine-Linux.c @@ -7,8 +7,7 @@ def_target(os_alpine, "alpine"); void os_alpine_prelude () { - use_this(os_alpine); - chef_allow_gs(os_alpine); + chef_prep_this (os_alpine, gs); chef_set_created_on (this, "2023-09-24"); chef_set_last_updated (this, "2025-08-10"); diff --git a/src/recipe/os/BSD/FreeBSD.c b/src/recipe/os/BSD/FreeBSD.c index d30f9ac..cffcf0d 100644 --- a/src/recipe/os/BSD/FreeBSD.c +++ b/src/recipe/os/BSD/FreeBSD.c @@ -7,8 +7,7 @@ def_target(os_freebsd, "freebsd"); void os_freebsd_prelude () { - use_this(os_freebsd); - chef_allow_s(os_freebsd); + chef_prep_this (os_freebsd, s); chef_set_created_on (this, "2023-09-03"); chef_set_last_updated (this, "2025-08-10"); @@ -47,7 +46,7 @@ os_freebsd_setsrc (char *option) // 据 @ykla,FreeBSD不自带sudo,但是我们依然要保证是root权限 chsrc_ensure_root (); - use_this(os_freebsd); + use_this (os_freebsd); int index = use_specific_mirror_or_auto_select (option, this); Source_t source = this->sources[index]; diff --git a/src/recipe/os/BSD/NetBSD.c b/src/recipe/os/BSD/NetBSD.c index 3e7a4d1..d5daacf 100644 --- a/src/recipe/os/BSD/NetBSD.c +++ b/src/recipe/os/BSD/NetBSD.c @@ -7,8 +7,7 @@ def_target(os_netbsd, "netbsd"); void os_netbsd_prelude () { - use_this(os_netbsd); - chef_allow_gs(os_netbsd); + chef_prep_this (os_netbsd, gs); chef_set_created_on (this, "2023-09-05"); chef_set_last_updated (this, "2025-08-10"); diff --git a/src/recipe/os/BSD/OpenBSD.c b/src/recipe/os/BSD/OpenBSD.c index 5551e26..2e5afce 100644 --- a/src/recipe/os/BSD/OpenBSD.c +++ b/src/recipe/os/BSD/OpenBSD.c @@ -7,8 +7,7 @@ def_target(os_openbsd, "openbsd"); void os_openbsd_prelude () { - use_this(os_openbsd); - chef_allow_gs(os_openbsd); + chef_prep_this (os_openbsd, gs); chef_set_created_on (this, "2023-09-03"); chef_set_last_updated (this, "2025-08-10"); diff --git a/src/recipe/os/Gentoo-Linux.c b/src/recipe/os/Gentoo-Linux.c index 6330cbe..7cd56ac 100644 --- a/src/recipe/os/Gentoo-Linux.c +++ b/src/recipe/os/Gentoo-Linux.c @@ -7,8 +7,7 @@ def_target(os_gentoo, "gentoo"); void os_gentoo_prelude () { - use_this(os_gentoo); - chef_allow_s(os_gentoo); + chef_prep_this (os_gentoo, s); chef_set_created_on (this, "2023-09-05"); chef_set_last_updated (this, "2025-08-10"); diff --git a/src/recipe/os/OpenWrt.c b/src/recipe/os/OpenWrt.c index 71bb642..5b5efa7 100644 --- a/src/recipe/os/OpenWrt.c +++ b/src/recipe/os/OpenWrt.c @@ -7,8 +7,7 @@ def_target(os_openwrt, "openwrt/opkg/LEDE"); void os_openwrt_prelude () { - use_this(os_openwrt); - chef_allow_gsr(os_openwrt); + chef_prep_this (os_openwrt, gsr); chef_set_created_on (this, "2024-08-08"); chef_set_last_updated (this, "2025-08-10"); diff --git a/src/recipe/os/Solus.c b/src/recipe/os/Solus.c index 6542b6f..966e83f 100644 --- a/src/recipe/os/Solus.c +++ b/src/recipe/os/Solus.c @@ -7,8 +7,7 @@ def_target(os_solus, "solus"); void os_solus_prelude () { - use_this(os_solus); - chef_allow_s(os_solus); + chef_prep_this (os_solus, s); chef_set_created_on (this, "2023-09-29"); chef_set_last_updated (this, "2025-08-10"); diff --git a/src/recipe/os/Void-Linux.c b/src/recipe/os/Void-Linux.c index ba500af..6f17aec 100644 --- a/src/recipe/os/Void-Linux.c +++ b/src/recipe/os/Void-Linux.c @@ -7,8 +7,7 @@ def_target(os_voidlinux, "voidlinux"); void os_voidlinux_prelude () { - use_this(os_voidlinux); - chef_allow_gsr(os_voidlinux); + chef_prep_this (os_voidlinux, gsr); chef_set_created_on (this, "2023-09-24"); chef_set_last_updated (this, "2025-08-10"); diff --git a/src/recipe/os/YUM/AlmaLinux.c b/src/recipe/os/YUM/AlmaLinux.c index ffe950f..5e709d5 100644 --- a/src/recipe/os/YUM/AlmaLinux.c +++ b/src/recipe/os/YUM/AlmaLinux.c @@ -7,8 +7,7 @@ def_target(os_almalinux, "alma/almalinux"); void os_almalinux_prelude () { - use_this(os_almalinux); - chef_allow_s(os_almalinux); + chef_prep_this (os_almalinux, s); chef_set_created_on (this, "2024-06-12"); chef_set_last_updated (this, "2025-08-10"); diff --git a/src/recipe/os/YUM/Anolis-OS.c b/src/recipe/os/YUM/Anolis-OS.c index fe71399..4127f9c 100644 --- a/src/recipe/os/YUM/Anolis-OS.c +++ b/src/recipe/os/YUM/Anolis-OS.c @@ -7,8 +7,7 @@ def_target(os_anolis, "anolis/openanolis"); void os_anolis_prelude () { - use_this(os_anolis); - chef_allow_s(os_anolis); + chef_prep_this (os_anolis, s); chef_set_created_on (this, "2023-09-24"); chef_set_last_updated (this, "2025-08-10"); diff --git a/src/recipe/os/YUM/Fedora-Linux.c b/src/recipe/os/YUM/Fedora-Linux.c index 999b0df..1b744d4 100644 --- a/src/recipe/os/YUM/Fedora-Linux.c +++ b/src/recipe/os/YUM/Fedora-Linux.c @@ -7,8 +7,7 @@ def_target(os_fedora, "fedora"); void os_fedora_prelude () { - use_this(os_fedora); - chef_allow_sr(os_fedora); + chef_prep_this (os_fedora, sr); chef_set_created_on (this, "2023-09-26"); chef_set_last_updated (this, "2025-08-10"); diff --git a/src/recipe/os/YUM/Rocky-Linux.c b/src/recipe/os/YUM/Rocky-Linux.c index 33d165a..051047b 100644 --- a/src/recipe/os/YUM/Rocky-Linux.c +++ b/src/recipe/os/YUM/Rocky-Linux.c @@ -7,8 +7,7 @@ def_target(os_rockylinux, "rocky/rockylinux"); void os_rockylinux_prelude () { - use_this(os_rockylinux); - chef_allow_sr(os_rockylinux); + chef_prep_this (os_rockylinux, sr); chef_set_created_on (this, "2023-09-24"); chef_set_last_updated (this, "2025-08-10"); diff --git a/src/recipe/os/YUM/openEuler.c b/src/recipe/os/YUM/openEuler.c index 97c3db8..47f68b1 100644 --- a/src/recipe/os/YUM/openEuler.c +++ b/src/recipe/os/YUM/openEuler.c @@ -7,8 +7,7 @@ def_target(os_openeuler, "openeuler"); void os_openeuler_prelude () { - use_this(os_openeuler); - chef_allow_gs(os_openeuler); + chef_prep_this (os_openeuler, gs); chef_set_created_on (this, "2023-09-06"); chef_set_last_updated (this, "2025-08-10"); diff --git a/src/recipe/os/openSUSE.c b/src/recipe/os/openSUSE.c index 0f29fb0..8a3cb38 100644 --- a/src/recipe/os/openSUSE.c +++ b/src/recipe/os/openSUSE.c @@ -7,8 +7,7 @@ def_target(os_opensuse, "opensuse/opensuse-leap/opensuse-tumbleweed"); void os_opensuse_prelude () { - use_this(os_opensuse); - chef_allow_s(os_opensuse); + chef_prep_this (os_opensuse, s); chef_set_created_on (this, "2023-09-17"); chef_set_last_updated (this, "2025-08-10"); diff --git a/src/recipe/os/pacman/Arch-Linux.c b/src/recipe/os/pacman/Arch-Linux.c index 5d4a791..af01323 100644 --- a/src/recipe/os/pacman/Arch-Linux.c +++ b/src/recipe/os/pacman/Arch-Linux.c @@ -10,8 +10,7 @@ def_target(os_arch, "arch/archlinux"); void os_arch_prelude () { - use_this(os_arch); - chef_allow_gs(os_arch); + chef_prep_this (os_arch, gs); chef_set_created_on (this, "2023-09-05"); chef_set_last_updated (this, "2025-08-10"); @@ -113,8 +112,7 @@ def_target(os_archlinuxcn, "archlinuxcn/archcn"); void os_archlinuxcn_prelude () { - use_this(os_archlinuxcn); - chef_allow_gs(os_archlinuxcn); + chef_prep_this (os_archlinuxcn, gs); chef_set_created_on (this, "2023-09-05"); chef_set_last_updated (this, "2025-08-10"); diff --git a/src/recipe/os/pacman/MSYS2.c b/src/recipe/os/pacman/MSYS2.c index 5a2f245..08dcfa0 100644 --- a/src/recipe/os/pacman/MSYS2.c +++ b/src/recipe/os/pacman/MSYS2.c @@ -7,8 +7,7 @@ def_target(os_msys2, "msys2/msys"); void os_msys2_prelude () { - use_this(os_msys2); - chef_allow_s(os_msys2); + chef_prep_this (os_msys2, s); chef_set_created_on (this, "2023-09-06"); chef_set_last_updated (this, "2025-08-10"); diff --git a/src/recipe/os/pacman/Manjaro-Linux.c b/src/recipe/os/pacman/Manjaro-Linux.c index 2e918f2..a1731fe 100644 --- a/src/recipe/os/pacman/Manjaro-Linux.c +++ b/src/recipe/os/pacman/Manjaro-Linux.c @@ -7,8 +7,7 @@ def_target(os_manjaro, "manjaro"); void os_manjaro_prelude () { - use_this(os_manjaro); - chef_allow_s(os_manjaro); + chef_prep_this (os_manjaro, s); chef_set_created_on (this, "2023-09-06"); chef_set_last_updated (this, "2025-08-10"); diff --git a/src/recipe/ware/Anaconda/Anaconda.c b/src/recipe/ware/Anaconda/Anaconda.c index baca25d..8536d92 100644 --- a/src/recipe/ware/Anaconda/Anaconda.c +++ b/src/recipe/ware/Anaconda/Anaconda.c @@ -9,8 +9,7 @@ def_target(wr_anaconda, "conda/anaconda"); void wr_anaconda_prelude () { - use_this(wr_anaconda); - chef_allow_gs(wr_anaconda); + chef_prep_this (wr_anaconda, gs); chef_set_created_on (this, "2023-09-10"); chef_set_last_updated (this, "2025-08-09"); diff --git a/src/recipe/ware/CocoaPods.c b/src/recipe/ware/CocoaPods.c index abe815a..78a4aed 100644 --- a/src/recipe/ware/CocoaPods.c +++ b/src/recipe/ware/CocoaPods.c @@ -7,8 +7,7 @@ def_target(wr_cocoapods, "cocoa/cocoapods/cocoapod"); void wr_cocoapods_prelude () { - use_this(wr_cocoapods); - chef_allow_s(wr_cocoapods); + chef_prep_this (wr_cocoapods, s); chef_set_created_on (this, "2024-06-08"); chef_set_last_updated (this, "2025-08-09"); diff --git a/src/recipe/ware/Docker/Docker.c b/src/recipe/ware/Docker/Docker.c index 7404153..8c9ebc2 100644 --- a/src/recipe/ware/Docker/Docker.c +++ b/src/recipe/ware/Docker/Docker.c @@ -24,8 +24,7 @@ def_target(wr_docker, "docker/dockerhub"); void wr_docker_prelude () { - use_this(wr_docker); - chef_allow_gs(wr_docker); + chef_prep_this (wr_docker, gs); chef_set_created_on (this, "2024-06-08"); chef_set_last_updated (this, "2025-08-09"); diff --git a/src/recipe/ware/Emacs.c b/src/recipe/ware/Emacs.c index 0c97887..1e8663a 100644 --- a/src/recipe/ware/Emacs.c +++ b/src/recipe/ware/Emacs.c @@ -14,8 +14,7 @@ def_target(wr_emacs, "emacs/elpa"); void wr_emacs_prelude () { - use_this(wr_emacs); - chef_allow_s(wr_emacs); + chef_prep_this (wr_emacs, s); chef_set_created_on (this, "2023-10-10"); chef_set_last_updated (this, "2025-08-09"); diff --git a/src/recipe/ware/Flatpak.c b/src/recipe/ware/Flatpak.c index 572c523..47d06c7 100644 --- a/src/recipe/ware/Flatpak.c +++ b/src/recipe/ware/Flatpak.c @@ -7,8 +7,7 @@ def_target(wr_flatpak, "flatpak/flathub"); void wr_flatpak_prelude () { - use_this(wr_flatpak); - chef_allow_gsr(wr_flatpak); + chef_prep_this (wr_flatpak, gsr); chef_set_created_on (this, "2023-09-11"); chef_set_last_updated (this, "2025-08-09"); diff --git a/src/recipe/ware/Guix.c b/src/recipe/ware/Guix.c index 2c74c13..5b39725 100644 --- a/src/recipe/ware/Guix.c +++ b/src/recipe/ware/Guix.c @@ -7,8 +7,7 @@ def_target(wr_guix, "guix"); void wr_guix_prelude () { - use_this(wr_guix); - chef_allow_s(wr_guix); + chef_prep_this (wr_guix, s); chef_set_created_on (this, "2023-09-11"); chef_set_last_updated (this, "2025-08-09"); diff --git a/src/recipe/ware/Homebrew/Homebrew.c b/src/recipe/ware/Homebrew/Homebrew.c index 9e206ad..baf2ea6 100644 --- a/src/recipe/ware/Homebrew/Homebrew.c +++ b/src/recipe/ware/Homebrew/Homebrew.c @@ -9,8 +9,7 @@ def_target(wr_homebrew, "brew/homebrew"); void wr_homebrew_prelude () { - use_this(wr_homebrew); - chef_allow_gs(wr_homebrew); + chef_prep_this (wr_homebrew, gs); chef_set_created_on (this, "2023-09-10"); chef_set_last_updated (this, "2025-08-09"); diff --git a/src/recipe/ware/Nix.c b/src/recipe/ware/Nix.c index 8504716..72b8756 100644 --- a/src/recipe/ware/Nix.c +++ b/src/recipe/ware/Nix.c @@ -7,8 +7,7 @@ def_target(wr_nix, "nix"); void wr_nix_prelude () { - use_this(wr_nix); - chef_allow_s(wr_nix); + chef_prep_this (wr_nix, s); chef_set_created_on (this, "2023-09-26"); chef_set_last_updated (this, "2025-08-09"); diff --git a/src/recipe/ware/TeX-Live.c b/src/recipe/ware/TeX-Live.c index 9de3455..10d89f1 100644 --- a/src/recipe/ware/TeX-Live.c +++ b/src/recipe/ware/TeX-Live.c @@ -9,8 +9,7 @@ def_target(wr_tex, "latex/ctan/tex/texlive/miktex/tlmgr/mpm"); void wr_tex_prelude () { - use_this(wr_tex); - chef_allow_gs(wr_tex); + chef_prep_this (wr_tex, gs); chef_set_created_on (this, "2023-09-10"); chef_set_last_updated (this, "2025-08-09"); diff --git a/src/recipe/ware/WinGet.c b/src/recipe/ware/WinGet.c index 70384f8..2bd3265 100644 --- a/src/recipe/ware/WinGet.c +++ b/src/recipe/ware/WinGet.c @@ -7,8 +7,7 @@ def_target(wr_winget, "winget"); void wr_winget_prelude () { - use_this(wr_winget); - chef_allow_gsr(wr_winget); + chef_prep_this (wr_winget, gsr); chef_set_created_on (this, "2024-06-07"); chef_set_last_updated (this, "2025-08-17");