From 4914ae213ec58f02d8a5a4b3d50148fa51bec214 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Varga=20P=C3=A1l?= Date: Wed, 8 Mar 2023 18:48:19 +0100 Subject: [PATCH] =?UTF-8?q?F=C3=A1jlok=20felt=C3=B6lt=C3=A9se=20a=20k?= =?UTF-8?q?=C3=B6vetkez=C5=91re:=20'tools'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tools/post-build.sh | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 tools/post-build.sh diff --git a/tools/post-build.sh b/tools/post-build.sh new file mode 100644 index 0000000..6f85daa --- /dev/null +++ b/tools/post-build.sh @@ -0,0 +1,16 @@ +#!/bin/sh + +FILE=$1 +if [ -z $FILE ] +then + exit 0 +fi + +OLD="$FILE.old" + +cp -f $FILE $OLD + +awk '$0 !~ /#define _BUILD/ { print $0 } + $0 ~ /#define _BUILD/ { n = $3 + 1; print $1 " " $2 " " n }' $OLD>$FILE + +rm -f $OLD