Browse Source

code tidy

pull/592/head
Daniel Gibbs 9 years ago
parent
commit
2125090fe6
  1. 20
      functions/check.sh

20
functions/check.sh

@ -8,15 +8,15 @@ lgsm_version="271215"
# Runs checks that will either halt on or fix an issue. # Runs checks that will either halt on or fix an issue.
array_contains () { array_contains () {
local seeking=$1; shift local seeking=$1; shift
local in=1 local in=1
for element; do for element; do
if [ ${element} == ${seeking} ]; then if [ ${element} == ${seeking} ]; then
in=0 in=0
break break
fi fi
done done
return $in return $in
} }
check_root.sh check_root.sh
@ -41,7 +41,7 @@ do
fi fi
done done
local allowed_commands_array=( command_debug.sh command_start.sh command_stop.sh update_check.sh command_validate.sh ) local allowed_commands_array=( command_debug.sh command_start.sh command_stop.sh update_check.sh command_validate.sh )
for allowed_command in "${allowed_commands_array[@]}" for allowed_command in "${allowed_commands_array[@]}"
do do
if [ "${allowed_command}" == "${function_selfname}" ]; then if [ "${allowed_command}" == "${function_selfname}" ]; then

Loading…
Cancel
Save