Browse Source

Updated ui

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

21
lgsm/functions/command_update_functions.sh

@ -8,34 +8,35 @@ local commandname="UPDATE LinuxGSM"
local commandaction="Update LinuxGSM" local commandaction="Update LinuxGSM"
local function_selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))" local function_selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))"
fn_print_dots "Updating functions" fn_print_dots "Updating LinuxGSM"
sleep 1 sleep 1
check.sh check.sh
fn_script_log_info "Updating functions" fn_script_log_info "Updating LinuxGSM"
echo -ne "\n" echo -ne "\n"
echo -ne " checking _default.cfg...\c" # Check and update _default.cfg
function_file_diff=$(diff "${configdirdefault}/config-lgsm/${servername}/_default.cfg" <(${curlpath} -s "https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/lgsm/config-default/config-lgsm/${servername}/_default.cfg")) echo -ne " checking config _default.cfg...\c"
if [ "${function_file_diff}" != "" ]; then config_file_diff=$(diff "${configdirdefault}/config-lgsm/${servername}/_default.cfg" <(${curlpath} -s "https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/lgsm/config-default/config-lgsm/${servername}/_default.cfg"))
if [ "${config_file_diff}" != "" ]; then
fn_print_update_eol_nl fn_print_update_eol_nl
fn_script_log_info "checking ${functionfile}: UPDATE" fn_script_log_info "checking config _default.cfg: UPDATE"
rm -rf "${configdirdefault}/config-lgsm/${servername}/_default.cfg" rm -f "${configdirdefault}/config-lgsm/${servername}/_default.cfg"
fn_fetch_config "lgsm/config-default/config-lgsm/${servername}" "_default.cfg" "${configdirdefault}/config-lgsm/${servername}" "_default.cfg" "noexecutecmd" "norun" "noforce" "nomd5" fn_fetch_config "lgsm/config-default/config-lgsm/${servername}" "_default.cfg" "${configdirdefault}/config-lgsm/${servername}" "_default.cfg" "noexecutecmd" "norun" "noforce" "nomd5"
else else
fn_print_ok_eol_nl fn_print_ok_eol_nl
fi fi
# Check and update functions
if [ -n "${functionsdir}" ]; then if [ -n "${functionsdir}" ]; then
if [ -d "${functionsdir}" ]; then if [ -d "${functionsdir}" ]; then
cd "${functionsdir}" cd "${functionsdir}"
for functionfile in * for functionfile in *
do do
echo -ne " checking ${functionfile}...\c" echo -ne " checking function ${functionfile}...\c"
function_file_diff=$(diff "${functionsdir}/${functionfile}" <(${curlpath} -s "https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/${github_file_url_dir}/${functionfile}")) function_file_diff=$(diff "${functionsdir}/${functionfile}" <(${curlpath} -s "https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/${github_file_url_dir}/${functionfile}"))
if [ "${function_file_diff}" != "" ]; then if [ "${function_file_diff}" != "" ]; then
fn_print_update_eol_nl fn_print_update_eol_nl
fn_script_log_info "checking ${functionfile}: UPDATE" fn_script_log_info "checking function ${functionfile}: UPDATE"
rm -rf "${functionsdir}/${functionfile}" rm -rf "${functionsdir}/${functionfile}"
fn_update_function fn_update_function
else else

Loading…
Cancel
Save