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