1
0
mirror of https://github.com/searxng/searxng.git synced 2024-11-04 20:30:11 +01:00

[fix] improve argument parsing of manage.sh

This commit is contained in:
Thomas Pointhuber 2016-03-02 18:41:19 +01:00
parent 667f7fde39
commit ceb70ccb5d

View File

@ -71,7 +71,7 @@ locales() {
}
help() {
[ -z "$1" ] || echo "Error: $1\n"
[ -z "$1" ] || echo -e "Error: $1\n"
echo "Searx manage.sh help
Commands
@ -90,7 +90,7 @@ Commands
"
}
if type $ACTION 1>/dev/null; then
if [ -n "$(type -t $ACTION)" ] && [ "$(type -t $ACTION)" = function ]; then
$ACTION
else
help "action not found"