#!/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