Browse Source

using selfname

pull/1477/head
Daniel Gibbs 8 years ago
parent
commit
d4c14e2158
  1. 5
      lgsm/functions/command_update_functions.sh

5
lgsm/functions/command_update_functions.sh

@ -26,7 +26,7 @@ else
fn_print_ok_eol_nl
fi
echo -ne " checking linuxgsm.sh...\c"
echo -ne " checking remote linuxgsm.sh...\c"
tmp_script_diff=$(diff "${tmpdir}/linuxgsm.sh" <(${curlpath} -s "https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/linuxgsm.sh"))
if [ "${tmp_script_diff}" != "" ]; then
fn_print_update_eol_nl
@ -37,9 +37,10 @@ if [ "${tmp_script_diff}" != "" ]; then
else
fn_print_ok_eol_nl
fi
echo -ne " checking ${selfname}...\c"
script_diff=$(diff <(sed '/shortname/d;/servername/d;/gamename/d' "${tmpdir}/linuxgsm.sh") <(sed '/shortname/d;/servername/d;/gamename/d' "${rootdir}/${selfname}"))
if [ "${script_diff}" != "" ]; then
echo -ne " backup linuxgsm.sh...\c"
echo -ne " backup ${selfname}...\c"
cp "${rootdir}/${selfname}" "${tmpdir}/${selfname}-$(date +"%m_%d_%Y_%M").bak"
if [ $? -ne 0 ]; then
fn_print_fail_eol_nl

Loading…
Cancel
Save