mirror of
https://github.com/LibreELEC/LibreELEC.tv.git
synced 2025-07-24 11:16:51 +00:00
config/show_config: allow direct execution
FUNCNAME[0] is a bash builtin that corresponds to the name of the currently executing function. Functions called in bare scripts are in the main() function. Bare scripts being sourced are in the source() function. Signed-off-by: Ian Leonard <antonlacon@gmail.com>
This commit is contained in:
parent
0ea91f8079
commit
f7ed0e72f2
8
config/show_config
Normal file → Executable file
8
config/show_config
Normal file → Executable file
@ -1,3 +1,5 @@
|
||||
#!/bin/bash
|
||||
|
||||
show_config() {
|
||||
# load graphic configuration
|
||||
get_graphicdrivers
|
||||
@ -115,3 +117,9 @@ show_config() {
|
||||
|
||||
echo -e "$config_message"
|
||||
}
|
||||
|
||||
|
||||
if [ "${FUNCNAME[0]}" = "main" ]; then
|
||||
. config/options ""
|
||||
show_config
|
||||
fi
|
||||
|
Loading…
x
Reference in New Issue
Block a user