on master help sign in
[fix] posix compatibility
commit1d5afa4ccc54cb8b7dd8aa9cce8dbe729c6e6768 authorAdam Tauber <asciimoo@gmail.com> dateThu 17 Mar 2016, 21:31 (11 years ago) parent0f518e4
1 file changed+4−6
manage.sh+4−6
manage.sh+4−6
@@ -71,7 +71,7 @@ locales() {
7171}
7272
7373help() {
74− [ -z "$1" ] || echo -e "Error: $1\n"
74+ [ -z "$1" ] || printf "Error: $1\n"
7575 echo "Searx manage.sh help
7676
7777Commands
@@ -90,8 +90,6 @@ Commands
9090"
9191}
9292
93−if [ -n "$(type -t $ACTION)" ] && [ "$(type -t $ACTION)" = function ]; then
94− $ACTION
95−else
96− help "action not found"
97−fi
93+[ "$(command -V "$ACTION" | grep ' function$')" != "" ] \
94+ && $ACTION \
95+ || help "action not found"