ceph/src/make_version
Dan Mick b227426838 Add NO_VERSION to avoid rebuilding ceph_ver.h and relinking
Signed-off-by: Dan Mick <dan.mick@inktank.com>
2014-03-18 19:05:19 -07:00

24 lines
347 B
Bash
Executable File

#!/bin/sh
echo '$1: '$1
if [ "$1" = "-n" ] ; then
cur="no_version"
v="Development"
else
cur=`head -1 $1`
v=`tail -1 $1 | cut -c 2-`
fi
print_all() {
echo "#ifndef CEPH_VERSION_H"
echo "#define CEPH_VERSION_H"
echo
echo "#define CEPH_GIT_VER $cur"
echo "#define CEPH_GIT_NICE_VER \"$v\""
echo
echo "#endif"
}
print_all > $2