#!/bin/sh # # Record the version of the source that we are compiling. # We keep a record of the git revision in util/version.cc. This source file # is then built as a regular source file as part of the compilation process. # One can run "strings executable_filename | grep _build_" to find the version of # the source that we used to build the executable file. OUTFILE="$PWD/util/build_version.cc" GIT_SHA="" if command -v git >/dev/null 2>&1; then GIT_SHA=$(git rev-parse HEAD 2>/dev/null) fi cat > "${OUTFILE}" <