1 changed files with 7 additions and 30 deletions
@ -1,38 +1,15 @@ |
|||||
#!/bin/bash |
#!/bin/bash |
||||
# LGSM command_update_functions.sh function |
# LGSM fn_update_functions function |
||||
# Author: Daniel Gibbs |
# Author: Daniel Gibbs |
||||
# Website: https://gameservermanagers.com |
# Website: https://gameservermanagers.com |
||||
lgsm_version="210516" |
lgsm_version="210516" |
||||
|
|
||||
# Description: Deletes the functions dir to allow re-downloading of functions from GitHub. |
# Description: REDIRECT FUNCTION to new command_update_functions.sh |
||||
|
|
||||
function_selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))" |
command_update_functions.sh(){ |
||||
check.sh |
functionfile="${FUNCNAME}" |
||||
fn_print_dots "Updating functions" |
fn_runfunction |
||||
fn_scriptlog "Updating functions" |
} |
||||
sleep 1 |
|
||||
echo -ne "\n" |
|
||||
|
|
||||
# Removed legecy functions dir |
command_update_functions.sh |
||||
if [ -n "${rootdir}" ]; then |
|
||||
if [ -d "${rootdir}/functions/" ]; then |
|
||||
rm -rfv "${rootdir}/functions/" |
|
||||
exitcode=$? |
|
||||
fi |
|
||||
fi |
|
||||
|
|
||||
if [ -n "${functionsdir}" ]; then |
|
||||
if [ -d "${functionsdir}" ]; then |
|
||||
rm -rfv "${functionsdir}/"* |
|
||||
exitcode=$? |
|
||||
fi |
|
||||
fi |
|
||||
|
|
||||
if [ "${exitcode}" == "0" ]; then |
|
||||
fn_print_ok "Updating functions" |
|
||||
fn_scriptlog "Success! Updating functions" |
|
||||
else |
|
||||
fn_print_fail "Updating functions" |
|
||||
fn_scriptlog "Failure! Updating functions" |
|
||||
fi |
|
||||
echo -ne "\n" |
|
Loading…
Reference in new issue