Home | History | Annotate | Line # | Download | only in scripts
mkver revision 1.5.6.2
      1  1.5.6.2  msaitoh #!/bin/sh
      2  1.5.6.2  msaitoh PROG=${1-UNKNOWN}
      3  1.5.6.2  msaitoh 
      4  1.5.6.2  msaitoh ConfStr="$PROG"
      5  1.5.6.2  msaitoh 
      6  1.5.6.2  msaitoh ConfStr="$ConfStr 4.2.8"
      7  1.5.6.2  msaitoh 
      8  1.5.6.2  msaitoh case "$CSET" in
      9  1.5.6.2  msaitoh  '') ;;
     10  1.5.6.2  msaitoh  *) ConfStr="$ConfStr@$CSET" ;;
     11  1.5.6.2  msaitoh esac
     12  1.5.6.2  msaitoh 
     13  1.5.6.2  msaitoh case "o" in
     14  1.5.6.2  msaitoh  '') ;;
     15  1.5.6.2  msaitoh  *) ConfStr="${ConfStr}-o" ;;
     16  1.5.6.2  msaitoh esac
     17  1.5.6.2  msaitoh 
     18  1.5.6.2  msaitoh ifile="`dirname $0`/../importdate"
     19  1.5.6.2  msaitoh 
     20  1.5.6.2  msaitoh if [ -f "$ifile" ]; then
     21  1.5.6.2  msaitoh   # NetBSD MKREPRO: Don't embed current date/time/run number
     22  1.5.6.2  msaitoh   ConfStr="$ConfStr "`cat "$ifile"`
     23  1.5.6.2  msaitoh else
     24  1.5.6.2  msaitoh   ConfStr="$ConfStr `LC_TIME=C TZ= date`"
     25  1.5.6.2  msaitoh 
     26  1.5.6.2  msaitoh   if [ ! -f .version ]; then
     27  1.5.6.2  msaitoh     echo 0 > .version
     28  1.5.6.2  msaitoh   fi
     29  1.5.6.2  msaitoh   RUN="`cat .version`"
     30  1.5.6.2  msaitoh   RUN="`expr $RUN + 1`"
     31  1.5.6.2  msaitoh   echo $RUN > .version
     32  1.5.6.2  msaitoh 
     33  1.5.6.2  msaitoh   ConfStr="$ConfStr (${RUN})"
     34  1.5.6.2  msaitoh fi
     35  1.5.6.2  msaitoh 
     36  1.5.6.2  msaitoh echo "Version <${ConfStr}>";
     37  1.5.6.2  msaitoh 
     38  1.5.6.2  msaitoh rm -f version.c
     39  1.5.6.2  msaitoh cat > version.c << -EoF-
     40  1.5.6.2  msaitoh /*
     41  1.5.6.2  msaitoh  * version file for $PROG
     42  1.5.6.2  msaitoh  */
     43  1.5.6.2  msaitoh #include <config.h>
     44  1.5.6.2  msaitoh const char * Version = "${ConfStr}";
     45  1.5.6.2  msaitoh -EoF-
     46