forked from Lainports/freebsd-ports
31 lines
1.6 KiB
Text
31 lines
1.6 KiB
Text
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
|