Scripts: make "revision" target work on macOS

This commit is contained in:
Franco Fichtner 2022-11-02 09:32:28 +01:00
parent 706841a629
commit b3ba075b04
2 changed files with 4 additions and 4 deletions

View File

@ -1,4 +1,4 @@
# Copyright (c) 2015-2021 Franco Fichtner <franco@opnsense.org> # Copyright (c) 2015-2022 Franco Fichtner <franco@opnsense.org>
# #
# Redistribution and use in source and binary forms, with or without # Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions # modification, are permitted provided that the following conditions
@ -345,7 +345,7 @@ sweep: check
xargs -0 -n1 ${SCRIPTSDIR}/cleanfile xargs -0 -n1 ${SCRIPTSDIR}/cleanfile
revision: revision:
@${SCRIPTSDIR}/revbump.sh ${.CURDIR} @MAKE=${MAKE} ${SCRIPTSDIR}/revbump.sh ${.CURDIR}
STYLEDIRS?= src/etc/inc src/opnsense STYLEDIRS?= src/etc/inc src/opnsense

View File

@ -8,8 +8,8 @@ if [ -z "${DIR}" ]; then
DIR=. DIR=.
fi fi
REV=$(make -C ${DIR} -v PLUGIN_REVISION) REV=$(${MAKE} -C ${DIR} -v PLUGIN_REVISION)
REV=$(expr ${REV} \+ 1) REV=$((REV + 1))
grep -v ^PLUGIN_REVISION ${DIR}/Makefile > ${DIR}/Makefile.tmp grep -v ^PLUGIN_REVISION ${DIR}/Makefile > ${DIR}/Makefile.tmp
sed -e "s/^\(PLUGIN_VERSION.*\)/\1%PLUGIN_REVISION= ${REV}/g" \ sed -e "s/^\(PLUGIN_VERSION.*\)/\1%PLUGIN_REVISION= ${REV}/g" \