Annotation of 43BSDReno/usr.sbin/amd/config/newvers.sh, revision 1.1.1.1

1.1       root        1: #!/bin/sh -
                      2: #
                      3: # $Id: newvers.sh,v 5.2 90/06/23 22:21:21 jsp Rel $
                      4: #
                      5: # Copyright (c) 1989 Jan-Simon Pendry
                      6: # Copyright (c) 1989 Imperial College of Science, Technology & Medicine
                      7: # Copyright (c) 1989 The Regents of the University of California.
                      8: # All Rights Reserved.
                      9: #
                     10: # This code is derived from software contributed to Berkeley by
                     11: # Jan-Simon Pendry at Imperial College, London.
                     12: #
                     13: # %sccs.include.redist.sh%
                     14: #
                     15: #      %W% (Berkeley) %G%
                     16: #
                     17: PATH=/usr/ucb:/bin:/usr/bin
                     18: if [ $# -ne 1 ]; then echo "Usage: newvers program" >&2; exit 1; fi
                     19: version="version.$1"
                     20: if [ ! -r $version ]; then echo 0 > $version; chmod 444 $version; fi
                     21: v=`cat $version`
                     22: u=${USER-${LOGNAME-root}}
                     23: h=`hostname`
                     24: #h=`expr "$h" : '\([^.]*\)'`
                     25: t=`date`
                     26: r=`cat $d../config/RELEASE`
                     27: c=`sed 's/$/\\\\n\\\\/' $d../text/COPYRIGHT`
                     28: if [ -z "$r" -o -z "$c" ]; then
                     29:        echo ERROR: config file missing >&2
                     30:        exit 1
                     31: fi
                     32: rm -f vers.$1.c
                     33: cat > vers.$1.c << %%
                     34: char version[] = "\\
                     35: ${c}
                     36: $1 ${r} #${v}: ${t}\\n\\
                     37: Built by ${u}@${h}";
                     38: %%
                     39: rm -f $version
                     40: /bin/echo `expr ${v} + 1` > $version
                     41: chmod 444 $version

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.