prereq: merge common cases in SetupHostCommand
[openwrt/staging/hauke.git] / include / prereq.mk
index a4a07c223fa2653ec17ff80bf10a3fd1954c893a..1039c5540c6a01a17d61851a7aa2f334d8eb1df4 100644 (file)
@@ -107,15 +107,9 @@ define SetupHostCommand
                        bin="$$$$$$$$(command -v "$$$$$$$${cmd%% *}")"; \
                        if [ -x "$$$$$$$$bin" ] && eval "$$$$$$$$cmd" >/dev/null 2>/dev/null; then \
                                case "$$$$$$$$(ls -dl -- $(STAGING_DIR_HOST)/bin/$(strip $(1)))" in \
-                                       *" -> $$$$$$$$bin"*) \
-                                               [ -x "$(STAGING_DIR_HOST)/bin/$(strip $(1))" ] && exit 0 \
-                                               ;; \
-                                       "-"*) \
-                                               [ -x "$(STAGING_DIR_HOST)/bin/$(strip $(1))" ] && exit 0 \
-                                               ;; \
-                                       *" -> /"*) \
-                                               ;; \
-                                       *" -> "*) \
+                                       "-"* | \
+                                       *" -> $$$$$$$$bin"* | \
+                                       *" -> "[!/]*) \
                                                [ -x "$(STAGING_DIR_HOST)/bin/$(strip $(1))" ] && exit 0 \
                                                ;; \
                                esac; \