Browse Source

Merge pull request #517 from pointhi/manage-improvement

[fix] improve argument parsing of manage.sh
Adam Tauber 9 years ago
parent
commit
fee556c990
1 changed files with 2 additions and 2 deletions
  1. 2
    2
      manage.sh

+ 2
- 2
manage.sh View File

71
 }
71
 }
72
 
72
 
73
 help() {
73
 help() {
74
-    [ -z "$1" ] || echo "Error: $1\n"
74
+    [ -z "$1" ] || echo -e "Error: $1\n"
75
     echo "Searx manage.sh help
75
     echo "Searx manage.sh help
76
 
76
 
77
 Commands
77
 Commands
90
 "
90
 "
91
 }
91
 }
92
 
92
 
93
-if type $ACTION 1>/dev/null; then
93
+if [ -n "$(type -t $ACTION)" ] && [ "$(type -t $ACTION)" = function ]; then
94
     $ACTION
94
     $ACTION
95
 else
95
 else
96
     help "action not found"
96
     help "action not found"