mirror of
https://github.com/Interlisp/maiko.git
synced 2026-02-04 23:44:42 +00:00
Maiko sources matching state as of 020102 prior to initial patching for Mac OSX
This commit is contained in:
68
bin/fixid
Executable file
68
bin/fixid
Executable file
@@ -0,0 +1,68 @@
|
||||
#!/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`;
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user