From 77830a96ed372ee62f13a17f4c80698a814b5f11 Mon Sep 17 00:00:00 2001 From: Aoran Zeng Date: Thu, 13 Jun 2024 00:21:00 +0800 Subject: [PATCH] Take a look at file --- include/chsrc.h | 2 +- src/chsrc.c | 40 ++++++++++++++++++++-------------------- 2 files changed, 21 insertions(+), 21 deletions(-) diff --git a/include/chsrc.h b/include/chsrc.h index 6fe2535..7f06121 100644 --- a/include/chsrc.h +++ b/include/chsrc.h @@ -471,7 +471,7 @@ chsrc_run (const char *cmd) static void -chsrc_check_file (const char *path) +chsrc_take_a_look_at_file (const char *path) { char *cmd = NULL; path = xy_uniform_path (path); diff --git a/src/chsrc.c b/src/chsrc.c index 9807358..57ffd0d 100644 --- a/src/chsrc.c +++ b/src/chsrc.c @@ -380,8 +380,8 @@ pl_php_setsrc (char *option) void pl_lua_getsrc (char *option) { - chsrc_check_file ("~/.luarocks/config.lua"); - chsrc_check_file ("~/.luarocks/upload_config.lua"); + chsrc_take_a_look_at_file ("~/.luarocks/config.lua"); + chsrc_take_a_look_at_file ("~/.luarocks/upload_config.lua"); } /** @@ -459,7 +459,7 @@ pl_go_setsrc (char *option) void pl_rust_getsrc (char *option) { - chsrc_check_file ("~/.cargo"); + chsrc_take_a_look_at_file ("~/.cargo"); } /** @@ -773,11 +773,11 @@ pl_r_getsrc (char *option) // if (xy_on_windows) { - chsrc_check_file ("~/Documents/.Rprofile"); + chsrc_take_a_look_at_file ("~/Documents/.Rprofile"); } else { - chsrc_check_file ("~/.Rprofile"); + chsrc_take_a_look_at_file ("~/.Rprofile"); } } @@ -824,7 +824,7 @@ pl_r_setsrc (char *option) void pl_julia_getsrc (char *option) { - chsrc_check_file ("~/.julia/config/startup.jl"); + chsrc_take_a_look_at_file ("~/.julia/config/startup.jl"); } /** @@ -925,11 +925,11 @@ os_ubuntu_getsrc (char *option) bool deb822_exist = xy_file_exist (ETC_APT_DEB822_UBUNTU_SOURCES); if (deb822_exist) { - chsrc_check_file (ETC_APT_DEB822_UBUNTU_SOURCES); + chsrc_take_a_look_at_file (ETC_APT_DEB822_UBUNTU_SOURCES); return; } - chsrc_check_file (ETC_APT_SOURCELIST); + chsrc_take_a_look_at_file (ETC_APT_SOURCELIST); } @@ -1012,7 +1012,7 @@ os_ubuntu_setsrc (char *option) void os_mint_getsrc (char *option) { - chsrc_check_file ("/etc/apt/sources.list.d/official-package-repositories.list"); + chsrc_take_a_look_at_file ("/etc/apt/sources.list.d/official-package-repositories.list"); } /** @@ -1044,7 +1044,7 @@ os_mint_setsrc (char *option) void os_debian_getsrc (char *option) { - chsrc_check_file (ETC_APT_SOURCELIST); + chsrc_take_a_look_at_file (ETC_APT_SOURCELIST); } /** @@ -1085,7 +1085,7 @@ os_debian_setsrc (char *option) void os_raspberrypi_getsrc (char *option) { - chsrc_check_file ("/etc/apt/sources.list.d/raspi.list"); + chsrc_take_a_look_at_file ("/etc/apt/sources.list.d/raspi.list"); } void @@ -1113,7 +1113,7 @@ os_raspberrypi_setsrc (char *option) void os_deepin_getsrc(char *option) { - chsrc_check_file (ETC_APT_SOURCELIST); + chsrc_take_a_look_at_file (ETC_APT_SOURCELIST); } /** @@ -1244,7 +1244,7 @@ os_opensuse_setsrc (char *option) void os_kali_getsrc (char *option) { - chsrc_check_file (ETC_APT_SOURCELIST); + chsrc_take_a_look_at_file (ETC_APT_SOURCELIST); } /** @@ -1435,7 +1435,7 @@ os_alma_setsrc (char *option) void os_alpine_getsrc (char *option) { - chsrc_check_file ("/etc/apk/repositories"); + chsrc_take_a_look_at_file ("/etc/apk/repositories"); } /** @@ -1541,7 +1541,7 @@ os_manjaro_setsrc (char *option) void os_trisquel_getsrc (char *option) { - chsrc_check_file (ETC_APT_SOURCELIST); + chsrc_take_a_look_at_file (ETC_APT_SOURCELIST); } /** @@ -1571,7 +1571,7 @@ os_trisquel_setsrc (char *option) void os_linuxlite_getsrc (char *option) { - chsrc_check_file (ETC_APT_SOURCELIST); + chsrc_take_a_look_at_file (ETC_APT_SOURCELIST); } /** @@ -1648,7 +1648,7 @@ os_anolis_setsrc (char *option) void os_openkylin_getsrc (char *option) { - chsrc_check_file (ETC_APT_SOURCELIST); + chsrc_take_a_look_at_file (ETC_APT_SOURCELIST); } void @@ -1782,7 +1782,7 @@ os_freebsd_setsrc (char *option) void os_netbsd_getsrc (char *option) { - chsrc_check_file ("/usr/pkg/etc/pkgin/repositories.conf"); + chsrc_take_a_look_at_file ("/usr/pkg/etc/pkgin/repositories.conf"); } /** @@ -1822,7 +1822,7 @@ os_netbsd_setsrc (char *option) void os_openbsd_getsrc (char *option) { - chsrc_check_file ("/etc/installurl"); + chsrc_take_a_look_at_file ("/etc/installurl"); } /** @@ -2137,7 +2137,7 @@ wr_dockerhub_getsrc (char *option) { if (xy_on_linux || xy_on_bsd) { - chsrc_check_file ("/etc/docker/daemon.json"); + chsrc_take_a_look_at_file ("/etc/docker/daemon.json"); } else {