diff options
author | Adam Tauber <asciimoo@gmail.com> | 2016-03-17 21:31:45 +0100 |
---|---|---|
committer | Adam Tauber <asciimoo@gmail.com> | 2016-03-17 21:31:45 +0100 |
commit | 1d5afa4ccc54cb8b7dd8aa9cce8dbe729c6e6768 (patch) | |
tree | 93dc001e2f56ec0fb77e4008a16debed5a5cbd75 /manage.sh | |
parent | 0f518e489ed1461282bc32a9a1faf310feebb1ba (diff) | |
download | searxng-1d5afa4ccc54cb8b7dd8aa9cce8dbe729c6e6768.tar.gz searxng-1d5afa4ccc54cb8b7dd8aa9cce8dbe729c6e6768.zip |
[fix] posix compatibility
Diffstat (limited to 'manage.sh')
-rwxr-xr-x | manage.sh | 10 |
1 files changed, 4 insertions, 6 deletions
@@ -71,7 +71,7 @@ locales() { } help() { - [ -z "$1" ] || echo -e "Error: $1\n" + [ -z "$1" ] || printf "Error: $1\n" echo "Searx manage.sh help Commands @@ -90,8 +90,6 @@ Commands " } -if [ -n "$(type -t $ACTION)" ] && [ "$(type -t $ACTION)" = function ]; then - $ACTION -else - help "action not found" -fi +[ "$(command -V "$ACTION" | grep ' function$')" != "" ] \ + && $ACTION \ + || help "action not found" |