1
0
mirror of https://github.com/Interlisp/maiko.git synced 2026-01-14 15:36:34 +00:00

69 lines
1.6 KiB
Perl
Executable File

#!/usr/local/bin/perl
# $Id: fixid,v 1.1 1999/01/03 04:00:20 sybalsky Exp $ #
#************************************************************************/
#* */
#* (C) Copyright 1999 Venue. All Rights Reserved. */
#* Manufactured in the United States of America. */
#* */
#* The contents of this file are proprietary information */
#* belonging to Venue, and are provided to you under license. */
#* They may not be further distributed or disclosed to third */
#* parties without the specific permission of Venue. */
#* */
#************************************************************************/
######################################################################
# #
# FIXID -- fix up the ID comment and static in source files #
# #
######################################################################
$file = shift;
chomp $file;
printf "File is %s.\n", $file;
open IN, "<" . $file;
open OUT, ">".$file.".new";
## Copy the first two lines of the file (ID comment & static)
$line = <IN>;
printf OUT "%s", $line;
$line = <IN>;
printf OUT "%s", $line;
## Now copy the rest of the file, omitting any line with a (#)
## in it (the likeliest ID Comment/static contents for SCCS.
$line = <IN>;
while ( $line )
{
if ( $line =~ /\(#\)/ )
{
printf "Omitting line: %s", $line;
}
else
{
printf OUT "%s", $line;
}
$line = <IN>;
}
close IN;
close OUT;
## Save the original file, and put the "fixed" on in its place.
`mv $file $file.orig`;
`mv $file.new $file`;