[OpenWrt-Devel] time command detect fail on centos

Etienne Champetier champetier.etienne at gmail.com
Tue Jul 10 15:38:39 EDT 2018


Hi,

2018-07-08 15:50 GMT+02:00 李国 <uxgood.org at gmail.com>:
> Hi Jon Burgess
> this patch works good. thanks.
> diff --git a/include/prereq.mk b/include/prereq.mk
> index 0f0f253744..173461e36f 100644
> --- a/include/prereq.mk
> +++ b/include/prereq.mk
> @@ -95,7 +95,7 @@ define SetupHostCommand
>                 if [ -n "$$$$$$$$cmd" ]; then \
>                         bin="$$$$$$$$(PATH="$(subst
> $(space),:,$(filter-out $(STAGING_DIR_HOST)/%,$(subst
> :,$(space),$(PATH))))" \
>                                 which "$$$$$$$${cmd%% *}")"; \
> -                       if [ -x "$$$$$$$$bin" ] && eval "$$$$$$$$cmd"
>>/dev/null 2>/dev/null; then \
> +                       if [ -x "$$$$$$$$bin" ] && eval
> "\\$$$$$$$$cmd" >/dev/null 2>/dev/null; then \
>                                 mkdir -p "$(STAGING_DIR_HOST)/bin"; \
>                                 ln -sf "$$$$$$$$bin"
> "$(STAGING_DIR_HOST)/bin/$(strip $(1))"; \
>                                 exit 0; \
>
> 2018-07-08 0:11 GMT+08:00 Jon Burgess <jburgess777 at gmail.com>:
>> On Sat, 2018-07-07 at 16:23 +0800, 李国 wrote:
>>> Hi Etienne Champetier
>>>
>>> time command detect fail on centos.
>>>
>>> time is a keyword of bash on centos 6 and centos 7, and it not accept
>>> --version option, this makes time --version 2>&1 | grep GNU  always
>>> fail.

I just tried a fresh git checkout of master on an up to date CentOS 7
After "yum install time" build work perfectly fine

Regards
Etienne

>>
>> Does using \time instead help?
>>
>>   Jon
>
> _______________________________________________
> openwrt-devel mailing list
> openwrt-devel at lists.openwrt.org
> https://lists.openwrt.org/mailman/listinfo/openwrt-devel

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


More information about the openwrt-devel mailing list