From b3ba075b047056f833b4fe79bff42bd6f78c898c Mon Sep 17 00:00:00 2001 From: Franco Fichtner Date: Wed, 2 Nov 2022 09:32:28 +0100 Subject: [PATCH] Scripts: make "revision" target work on macOS --- Mk/plugins.mk | 4 ++-- Scripts/revbump.sh | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Mk/plugins.mk b/Mk/plugins.mk index 591598d67..9c3f4d547 100644 --- a/Mk/plugins.mk +++ b/Mk/plugins.mk @@ -1,4 +1,4 @@ -# Copyright (c) 2015-2021 Franco Fichtner +# Copyright (c) 2015-2022 Franco Fichtner # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions @@ -345,7 +345,7 @@ sweep: check xargs -0 -n1 ${SCRIPTSDIR}/cleanfile revision: - @${SCRIPTSDIR}/revbump.sh ${.CURDIR} + @MAKE=${MAKE} ${SCRIPTSDIR}/revbump.sh ${.CURDIR} STYLEDIRS?= src/etc/inc src/opnsense diff --git a/Scripts/revbump.sh b/Scripts/revbump.sh index 31f1fa974..674fd50c2 100755 --- a/Scripts/revbump.sh +++ b/Scripts/revbump.sh @@ -8,8 +8,8 @@ if [ -z "${DIR}" ]; then DIR=. fi -REV=$(make -C ${DIR} -v PLUGIN_REVISION) -REV=$(expr ${REV} \+ 1) +REV=$(${MAKE} -C ${DIR} -v PLUGIN_REVISION) +REV=$((REV + 1)) grep -v ^PLUGIN_REVISION ${DIR}/Makefile > ${DIR}/Makefile.tmp sed -e "s/^\(PLUGIN_VERSION.*\)/\1%PLUGIN_REVISION= ${REV}/g" \