4cee4be6139d7ed900055f999947f2d43b1ed305
[feisty_meow.git] / scripts / rev_control / cvs_fix.pl
1 #!/usr/bin/perl
2
3 ###############################################################################
4 #                                                                             #
5 #  Name   : cvs_fix                                                           #
6 #  Author : Chris Koeritz                                                     #
7 #  Rights : Copyright (C) 2001-$now by Author                                 #
8 #                                                                             #
9 #  Purpose:                                                                   #
10 #                                                                             #
11 #    Flips any win32 slashes into friendly forward slashes before running     #
12 #  the cvs binary.                                                            #
13 #                                                                             #
14 ###############################################################################
15 #  This program is free software; you can redistribute it and/or modify it    #
16 #  under the terms of the GNU General Public License as published by the Free #
17 #  Software Foundation; either version 2 of the License or (at your option)   #
18 #  any later version.  See: "http://www.gruntose.com/Info/GNU/GPL.html" for a #
19 #  version of the License.  Please send any updates to "fred@gruntose.com".   #
20 ###############################################################################
21
22 #require "filename_helper.pl";
23
24 $new_cmd="cvs";
25
26 foreach $i (@ARGV) {
27 #  printf "$i\n";
28   $i =~ s/[\/\\]*$//;
29   $i =~ s/\\/\//g;
30 #  print " --> $i\n";
31   if ($i =~ /^co$/) {
32     # insert our modifiers here.
33     $new_cmd = $new_cmd . " " . $i . " -P -kb ";
34   } else {
35     # normal addition of next parameter.
36     $new_cmd = $new_cmd . " " . $i;
37   }
38 }
39
40 #printf "new command is: \"$new_cmd\"\n";
41 #printf "are the -P and -kb flags in there?\n";
42 system("$new_cmd");
43
44 1;
45