110742Smckusick# !/bin/csh
210742Smckusick#
3*11860Speter#	@(#)newversion.csh	2.3 (Berkeley) 83/04/07
410742Smckusick#	update the version number of your argument makefile, etc.
510742Smckusick#
610742Smckusickif ( $#argv != 2 ) then
710742Smckusick    echo "usage: /bin/csh newversion.csh whoami directory"
810742Smckusick    exit(1)
910742Smckusickendif
1010742Smckusickset whoami = $1
1110742Smckusickset dir = $2
1210742Smckusickset makefile = ${whoami}makefile
1310742Smckusicksccs edit $makefile
1410742Smckusickset oldversion = `grep "VERSION = " $makefile | sed "s/VERSION = //"`
1510742Smckusickcp $makefile /tmp/$$; awk -f newversion.awk < /tmp/$$ > $makefile ; rm /tmp/$$
1610742Smckusickset newversion = `grep "VERSION = " $makefile | sed "s/VERSION = //"`
1710742Smckusickecho version $oldversion becomes $newversion automagically.
18*11860Spetersccs delget $makefile << EOF
1910742Smckusickversion $oldversion becomes $newversion automagically.
2010742SmckusickEOF
2110742Smckusickmv $dir/${whoami}${oldversion}strings $dir/${whoami}${newversion}strings
22