on master help sign in
[fix] improve argument parsing of manage.sh
commitceb70ccb5d81a1081e84bda9b564bf86dca4abc7 authorThomas Pointhuber <thomas.pointhuber@gmx.at> dateWed 2 Mar 2016, 18:41 (11 years ago) parent667f7fd
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"