122253Sdist#!/bin/csh -f 210742Smckusick# 3*62202Sbostic# Copyright (c) 1980, 1993 4*62202Sbostic# The Regents of the University of California. All rights reserved. 522253Sdist# 648118Sbostic# %sccs.include.redist.sh% 722253Sdist# 8*62202Sbostic# @(#)newversion.csh 8.1 (Berkeley) 06/06/93 948118Sbostic# 1048118Sbostic 1110742Smckusick# update the version number of your argument makefile, etc. 1210742Smckusick# 1348118Sbostic 1410742Smckusickif ( $#argv != 2 ) then 1510742Smckusick echo "usage: /bin/csh newversion.csh whoami directory" 1610742Smckusick exit(1) 1710742Smckusickendif 1810742Smckusickset whoami = $1 1910742Smckusickset dir = $2 2010742Smckusickset makefile = ${whoami}makefile 2110742Smckusicksccs edit $makefile 2210742Smckusickset oldversion = `grep "VERSION = " $makefile | sed "s/VERSION = //"` 2310742Smckusickcp $makefile /tmp/$$; awk -f newversion.awk < /tmp/$$ > $makefile ; rm /tmp/$$ 2410742Smckusickset newversion = `grep "VERSION = " $makefile | sed "s/VERSION = //"` 2510742Smckusickecho version $oldversion becomes $newversion automagically. 2611860Spetersccs delget $makefile << EOF 2710742Smckusickversion $oldversion becomes $newversion automagically. 2810742SmckusickEOF 2910742Smckusickmv $dir/${whoami}${oldversion}strings $dir/${whoami}${newversion}strings 30