mirror of
https://github.com/ceph/ceph
synced 2025-01-12 14:10:27 +00:00
0cd3e56224
Signed-off-by: Stanislav Sedov <stas@FreeBSD.org>
19 lines
333 B
Bash
Executable File
19 lines
333 B
Bash
Executable File
#!/bin/sh
|
|
|
|
if [ ! -d ../.git ]; then
|
|
echo "not updating .git_version (no ../.git)"
|
|
exit 0
|
|
fi
|
|
|
|
dname=`dirname $0`
|
|
cur=`git rev-parse HEAD 2>/dev/null; git describe 2>/dev/null`
|
|
[ -e $1 ] && old=`cat $1`
|
|
|
|
if [ "$cur" != "$old" ]; then
|
|
echo regenerating $1 with $cur
|
|
echo "$cur" > $1
|
|
else
|
|
echo $1 is up to date.
|
|
fi
|
|
|