fixed indentation
This commit is contained in:
14
lib/utils.sh
14
lib/utils.sh
@@ -21,14 +21,14 @@ export -f stdtime
|
||||
# Check if a function exists, return 0 if so
|
||||
function_exists() {
|
||||
if [[ $# -ne 1 ]]; then
|
||||
prnt E "function_exists(): A function name is required!"
|
||||
die 11 --force
|
||||
prnt E "function_exists(): A function name is required!"
|
||||
die 11 --force
|
||||
fi
|
||||
|
||||
if [[ $(LC_ALL=C type -t $1 | grep function) ]]; then
|
||||
return 0
|
||||
return 0
|
||||
else
|
||||
return 1
|
||||
return 1
|
||||
fi
|
||||
}
|
||||
export -f function_exists
|
||||
@@ -39,8 +39,8 @@ export -f function_exists
|
||||
get_mod_name()
|
||||
{
|
||||
if [[ $# -ne 1 ]]; then
|
||||
prnt E "get_mod_name(): Bad number of parameters."
|
||||
die 11 --force
|
||||
prnt E "get_mod_name(): Bad number of parameters."
|
||||
die 11 --force
|
||||
fi
|
||||
echo $(basename $1 | cut -f 1 -d '.')
|
||||
}
|
||||
@@ -62,7 +62,7 @@ export -f trim
|
||||
dump_key_buffer()
|
||||
{
|
||||
while read -r -t 0.001; do
|
||||
:
|
||||
:
|
||||
done
|
||||
}
|
||||
export -f dump_key_buffer
|
||||
|
||||
Reference in New Issue
Block a user