mkver revision 330106
1#!/bin/sh 2# 3# $FreeBSD: stable/11/usr.sbin/ntp/scripts/mkver 330106 2018-02-28 09:01:03Z delphij $ 4# 5PROG=${1-UNKNOWN} 6 7ConfStr="$PROG" 8 9ConfStr="$ConfStr 4.2.8p11" 10 11case "$CSET" in 12 '') ;; 13 *) ConfStr="$ConfStr@$CSET" ;; 14esac 15 16case "" in 17 '') 18 case "1" in 19 '') ;; 20 *) ConfStr="${ConfStr}-a" ;; 21 esac 22 ;; 23 *) ConfStr="${ConfStr}-r" ;; 24esac 25 26if [ ! -f .version ]; then 27 echo 0 > .version 28fi 29RUN="`cat .version`" 30RUN="`expr $RUN + 1`" 31echo $RUN > .version 32 33ConfStr="$ConfStr (${RUN})" 34 35echo "Version <${ConfStr}>"; 36 37rm -f version.c 38cat > version.c << -EoF- 39/* 40 * version file for $PROG 41 */ 42#include <config.h> 43const char * Version = "${ConfStr}"; 44-EoF- 45