Site hosted by Build your free website today!

Have problems identifying file types everytime you import to CVS? Use this Perl script to generate the cvswrapper file!

The following Perl programs goes over your target directory, uses the unix "file" command to identify file types and create a file in the cvswrapper format.

Cut paste the code below to a file called "" and run it as <Dir> <cvs_wrapper_to_write>

Note 1: It assumes that all files of the same extension are simillar!

Note 2: You can modify the script to import each file by its type. To do this, add this to line 19

$wstr = "-W \"-k 'b'\"" if  $EXT{$key} !~ /text/;
system("cvs import -I! $wstr $file");

and run "cvs commit" after the script completes.