| Server IP : 82.208.35.60 / Your IP : 216.73.216.168 Web Server : Apache/2.4.55 (FreeBSD) OpenSSL/1.1.1q-freebsd PHP/7.3.31 System : FreeBSD server7.d2m.cz 12.4-RELEASE-p9 FreeBSD 12.4-RELEASE-p9 GENERIC amd64 User : studiokobylisy_cz ( 1008) PHP Version : 7.3.31 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /usr/ports/sysutils/beats6/files/ |
Upload File : |
Fix syntax for sh (get rid of bash-isms)
--- libbeat/scripts/Makefile.orig 2019-10-15 21:08:29 UTC
+++ libbeat/scripts/Makefile
@@ -35,7 +35,7 @@ GOFILES = $(shell find . -type f -name '*.go')
GOFILES_NOVENDOR = $(shell find . -type f -name '*.go' -not -path "*/vendor/*")
GOFILES_ALL = $(GOFILES) $(shell find $(ES_BEATS) -type f -name '*.go')
GOPACKAGES_STRESSTESTS=$(shell find . -name '*.go' | xargs awk 'FNR>1 {nextfile} /\+build.*stresstest/ {print FILENAME; nextfile}' | xargs dirname | uniq)
-SHELL=bash
+SHELL=sh
ES_HOST?="elasticsearch"
PWD=$(shell pwd)
BUILD_DIR?=$(shell pwd)/build
@@ -108,7 +108,7 @@ ${BEAT_NAME}.test: $(GOFILES_ALL)
.PHONY: crosscompile
crosscompile: ## @build Cross-compile beat for the OS'es specified in GOX_OS variable. The binaries are placed in the build/bin directory.
crosscompile: $(GOFILES)
-ifneq ($(shell [[ $(BEAT_NAME) == journalbeat ]] && echo true ),true)
+ifneq ($(shell [ $(BEAT_NAME) == journalbeat ] && echo true ),true)
go get github.com/mitchellh/gox
mkdir -p ${BUILD_DIR}/bin
gox -output="${BUILD_DIR}/bin/{{.Dir}}-{{.OS}}-{{.Arch}}" -os="$(strip $(GOX_OS))" -osarch="$(strip $(GOX_OSARCH))" ${GOX_FLAGS}
@@ -338,7 +338,7 @@ ifeq ($(BEAT_REF_YAML),true)
@chmod 0640 ${BEAT_NAME}.reference.yml
endif
-ifneq ($(shell [[ $(BEAT_NAME) == libbeat || $(BEAT_NAME) == metricbeat ]] && echo true ),true)
+ifneq ($(shell [ $(BEAT_NAME) == libbeat -o $(BEAT_NAME) == metricbeat ] && echo true ),true)
mkdir -p include
go run ${ES_BEATS}/dev-tools/cmd/asset/asset.go -license $(LICENSE) -pkg include -in fields.yml -out include/fields.go $(BEAT_NAME)
endif