mirror of
https://github.com/RsyncProject/rsync.git
synced 2026-02-05 20:52:45 -05:00
Some hosts were not running `mkgitver` when they should, so tweak the script to only update the timestamp when the file's data changes and then always run the script when performing a build.
21 lines
404 B
Bash
Executable File
21 lines
404 B
Bash
Executable File
#!/bin/sh
|
|
|
|
srcdir=`dirname $0`
|
|
gitver=`git describe --abbrev=8 2>/dev/null`
|
|
|
|
if [ ! -f git-version.h ]; then
|
|
touch git-version.h
|
|
fi
|
|
|
|
case "$gitver" in
|
|
*.*)
|
|
echo "#define RSYNC_GITVER \"$gitver\"" >git-version.h.new
|
|
if ! diff git-version.h.new git-version.h >/dev/null; then
|
|
echo "Updating git-version.h"
|
|
mv git-version.h.new git-version.h
|
|
else
|
|
rm git-version.h.new
|
|
fi
|
|
;;
|
|
esac
|