Browse Source

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.
feature/dst-changes
Daniel Gibbs 2 years ago
parent
commit
d779fae7d3
No known key found for this signature in database GPG Key ID: 2076B128385E8C55
  1. 8
      lgsm/modules/command_update_linuxgsm.sh

8
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

Loading…
Cancel
Save