|
|
@@ -34,26 +34,26 @@ if [ "${tmp_script_diff}" != "" ]; then
|
|
|
rm -f "${tmpdir}/linuxgsm.sh"
|
|
|
fn_fetch_file_github "" "linuxgsm.sh" "${tmpdir}" "linuxgsm.sh" "noexecutecmd" "norun" "noforce" "nomd5"
|
|
|
# Compare selfname against linuxgsm.sh in the tmp dir. Ignoring server specific vars.
|
|
|
- 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"
|
|
|
- cp "${rootdir}/${selfname}" "${tmpdir}/${selfname}-$(date +"%m_%d_%Y_%M").bak"
|
|
|
- if [ $? -ne 0 ]; then
|
|
|
- fn_print_fail_eol_nl
|
|
|
- core_exit.sh
|
|
|
- else
|
|
|
- fn_print_ok_eol_nl
|
|
|
- echo -en "${tmpdir}/${selfname}-$(date +"%m_%d_%Y_%M").bak"
|
|
|
- fi
|
|
|
- copyshortname="$(grep -m 1 shortname=)" "${rootdir}/${selfname}"
|
|
|
- copyservername="$(grep -m 1 servername=)" "${rootdir}/${selfname}"
|
|
|
- copygamename="$(grep -m 1 gamename=)" "${rootdir}/${selfname}"
|
|
|
-
|
|
|
- cp "${tmpdir}/linuxgsm.sh" "${rootdir}/${selfname}"
|
|
|
- sed -i 's/shortname="core"/${copyshortname}/g' "${rootdir}/${selfname}"
|
|
|
- sed -i 's/shortname="core"/${copyshortname}/g' "${rootdir}/${selfname}"
|
|
|
- sed -i 's/shortname="core"/${copyshortname}/g' "${rootdir}/${selfname}"
|
|
|
+fi
|
|
|
+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"
|
|
|
+ cp "${rootdir}/${selfname}" "${tmpdir}/${selfname}-$(date +"%m_%d_%Y_%M").bak"
|
|
|
+ if [ $? -ne 0 ]; then
|
|
|
+ fn_print_fail_eol_nl
|
|
|
+ core_exit.sh
|
|
|
+ else
|
|
|
+ fn_print_ok_eol_nl
|
|
|
+ echo -en "${tmpdir}/${selfname}-$(date +"%m_%d_%Y_%M").bak"
|
|
|
fi
|
|
|
+ copyshortname="$(grep -m 1 shortname= "${rootdir}/${selfname}")"
|
|
|
+ copyservername="$(grep -m 1 servername= "${rootdir}/${selfname}")"
|
|
|
+ copygamename="$(grep -m 1 gamename= "${rootdir}/${selfname}")"
|
|
|
+
|
|
|
+ cp "${tmpdir}/linuxgsm.sh" "${rootdir}/${selfname}"
|
|
|
+ sed -i 's/shortname="core"/${copyshortname}/g' "${rootdir}/${selfname}"
|
|
|
+ sed -i 's/shortname="core"/${copyshortname}/g' "${rootdir}/${selfname}"
|
|
|
+ sed -i 's/shortname="core"/${copyshortname}/g' "${rootdir}/${selfname}"
|
|
|
else
|
|
|
fn_print_ok_eol_nl
|
|
|
fi
|