1#!/bin/csh -f 2# 3# Copyright (c) 1980 Regents of the University of California. 4# All rights reserved. The Berkeley software License Agreement 5# specifies the terms and conditions for redistribution. 6# 7# @(#)newversion.csh 5.1 (Berkeley) 06/05/85 8# 9# update the version number of your argument makefile, etc. 10# 11if ( $#argv != 2 ) then 12 echo "usage: /bin/csh newversion.csh whoami directory" 13 exit(1) 14endif 15set whoami = $1 16set dir = $2 17set makefile = ${whoami}makefile 18sccs edit $makefile 19set oldversion = `grep "VERSION = " $makefile | sed "s/VERSION = //"` 20cp $makefile /tmp/$$; awk -f newversion.awk < /tmp/$$ > $makefile ; rm /tmp/$$ 21set newversion = `grep "VERSION = " $makefile | sed "s/VERSION = //"` 22echo version $oldversion becomes $newversion automagically. 23sccs delget $makefile << EOF 24version $oldversion becomes $newversion automagically. 25EOF 26mv $dir/${whoami}${oldversion}strings $dir/${whoami}${newversion}strings 27