2 # $TOG: process_msg /main/4 1999/09/20 10:33:13 mgreess $
3 # Script to determine which source files need to have new messages
4 # substitued into them and accomplish those substitutions. The
5 # files on the command line will be run thru genmsg, and those
6 # files that exhibit actual differences will then be checked out,
7 # and really run thru genmsg, and then checked back in.
9 # To use the script, you must scccs get all of the source files you wish
10 # to process, as well as dtcm.msg and project.set. When ready, one runs
11 # "process_msg *.c". It will look thru all the .c files, looking to
12 # see which ones have unassigned message id's, and check those files out.
13 # It will then run those files thru genmsg, and regenerate the dtcm.msg
14 # file. You must delta in the processed .c files as well as project.set
15 # and dtcm.msg. A bunch of old .msg files will remain in the directory.
16 # The old message file will be stored in dtcm.msg.orig.
18 rm -f *.new *.msg >/dev/null
23 genmsg -l project.set $file >/dev/null
24 diff $file $file.new >/dev/null
27 filelist="$filelist $file"
33 if [ "$filelist" = "$null" ]
35 echo "No files need to be updated. Exiting."
39 # Now that we have the list of files that actually need to
40 # be changed, check to see if any of them are already checked
41 # out. If they are, then quit with an error, else run
42 # genmsg to change them.
50 for newfile in $checkout
52 if [ "$file" = "$newfile" ]
54 echo "The file $file needs to be changed, but is already checked out. Exiting"
62 sccs edit $filelist project.set dtcm.msg
67 genmsg -c NL_COMMENT -l project.set $file >/dev/null
69 mv project.set.new project.set
72 # regenerate the message file for the application
74 mv -f dtcm.msg dtcm.msg.orig
76 genmsg -c NL_COMMENT -d dtcm.msg $*
78 #sccs unedit $filelist project.set dtcm.msg