on master help sign in
Merge pull request #517 from pointhi/manage-improvement

[fix] improve argument parsing of manage.sh

commitfee556c9904637051a9ba874ba7e71cd9f10789f authorAdam Tauber <asciimoo@gmail.com> dateWed 2 Mar 2016, 22:08 (11 years ago) parent667f7fdceb70cc
1 file changed+2−2
manage.sh+2−2
manage.sh+2−2
@@ -71,7 +71,7 @@ locales() {
7171}
7272
7373help() {
74− [ -z "$1" ] || echo "Error: $1\n"
74+ [ -z "$1" ] || echo -e "Error: $1\n"
7575 echo "Searx manage.sh help
7676
7777Commands
@@ -90,7 +90,7 @@ Commands
9090"
9191}
9292
93−if type $ACTION 1>/dev/null; then
93+if [ -n "$(type -t $ACTION)" ] && [ "$(type -t $ACTION)" = function ]; then
9494 $ACTION
9595else
9696 help "action not found"