4
0
Эх сурвалжийг харах

refactor: simplify code for checking file differences

The commit simplifies the code for checking file differences in the `command_update_linuxgsm.sh` script. It replaces the function `fn_print_ok_eol_nl` with `fn_print_skip_eol_nl` to improve readability and maintainability.
Daniel Gibbs 2 жил өмнө
parent
commit
d779fae7d3

+ 4 - 4
lgsm/modules/command_update_linuxgsm.sh

@@ -61,7 +61,7 @@ if [ "${tmp_script_diff}" != "" ]; then
 	rm -f "${tmpdir:?}/linuxgsm.sh"
 	fn_fetch_file_github "" "linuxgsm.sh" "${tmpdir}" "nochmodx" "norun" "noforcedl" "nohash"
 else
-	fn_print_update_eol_nl
+	fn_print_skip_eol_nl
 	fn_script_log_pass "Checking ${remotereponame} script linuxgsm.sh"
 fi
 
@@ -110,7 +110,7 @@ if [ "${script_diff}" != "" ]; then
 		fn_script_log_pass "copying ${selfname}"
 	fi
 else
-	fn_print_ok_eol_nl
+	fn_print_skip_eol_nl
 	fn_script_log_info "Checking ${selfname}"
 fi
 
@@ -143,7 +143,7 @@ if [ "${config_file_diff}" != "" ]; then
 	alert="config"
 	alert.sh
 else
-	fn_print_ok_eol_nl
+	fn_print_skip_eol_nl
 	fn_script_log_pass "Checking ${remotereponame} config _default.cfg"
 fi
 
@@ -175,7 +175,7 @@ if [ -f "${datadir}/${distroid}-${distroversioncsv}.csv" ]; then
 		rm -f "${datadir:?}/${distroid}-${distroversioncsv}.csv"
 		fn_fetch_file_github "lgsm/data" "${distroid}-${distroversioncsv}.csv" "${datadir}" "nochmodx" "norun" "noforce" "nohash"
 	else
-		fn_print_ok_eol_nl
+		fn_print_skip_eol_nl
 		fn_script_log_pass "Checking ${remotereponame} ${distroid}-${distroversioncsv}.csv"
 	fi
 fi