ceph/src/make_version
Stanislav Sedov 0cd3e56224 Use /bin/sh, which is more portable.
Signed-off-by:	Stanislav Sedov <stas@FreeBSD.org>
2011-10-04 17:34:40 -07:00

17 lines
252 B
Bash
Executable File

#!/bin/sh
cur=`head -1 $1`
v=`tail -1 $1 | cut -c 2-`
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