blob: 7c52482b49b5a7820de5ca92b7452f34c73b42d2 [file] [log] [blame]
#!/bin/sh
REV=`git rev-parse HEAD 2> /dev/null`
if [ "$?" -eq 0 ]; then
if [ -n "`git diff-index --name-only HEAD 2> /dev/null`" ]; then
REV="${REV}-dirty"
fi
else
REV="unknown"
fi
cat > "$1" <<EOF
// This file is generated by $0. DO NOT EDIT.
#pragma once
#define ZIRCON_GIT_REV "${REV}"
EOF