summaryrefslogtreecommitdiffstats
path: root/eurephiadm/mk_buildinfo.sh
diff options
context:
space:
mode:
Diffstat (limited to 'eurephiadm/mk_buildinfo.sh')
-rwxr-xr-xeurephiadm/mk_buildinfo.sh6
1 files changed, 3 insertions, 3 deletions
diff --git a/eurephiadm/mk_buildinfo.sh b/eurephiadm/mk_buildinfo.sh
index 0b6e36e..d4577df 100755
--- a/eurephiadm/mk_buildinfo.sh
+++ b/eurephiadm/mk_buildinfo.sh
@@ -36,8 +36,8 @@ if [[ $? = 0 ]]; then
curdir=`pwd`
srcroot="`dirname $gitdir`"
cd $srcroot
- modfiles="`git status -s | awk '/^[ ADM\?]([ ADM\?])/{ printf " %s\\\n", $0 }'`"
- [[ -z ${modfiles} ]] && state=0 || state=1
+ modfiles="`git status -s | awk 'BEGIN{modcount=0} /^[ ADM\?]([ ADM\?])/{ printf " %s\\\n", $0; modcount += 1 } END{exit modcount}'`"
+ modcount=$?
cd $curdir
else
# Otherwise, it's from a source tarball
@@ -58,7 +58,7 @@ if [[ -n "${gitrev}" ]]; then
#define GITDIR "${gitdir}"
#define BUILDBRANCH "${branch}"
#define BUILDGITREV "${gitrev}"
-#define GITSTATE "${state}"
+#define MODIFIEDCOUNT ${modcount}
#define MODIFIEDFILES "${modfiles}"
EOF
fi