Hi,
I couldn't find an answer to the following question in CVS documentation, I
hope this is the right forum for such questions:
I would like to set up a CVS repository that will work with both WinNT and
Unix. I have a set of Perl scripts that I wrote to check files before they
are committed and to collect commit information during "cvs commit". I would
like CVS to run these scripts by calling them in the "commitinfo" and
"loginfo" files in the CVSROOT directory of the repository, but I have a
problem specifying their paths, because of two reasons:
1. The path-style is different across WinNT and Unix. The Perl executable is
in the path in both systems, and it can overcome the "/", "\" difference
between the systems, but I would like to specify an absolute path for the
file containing the script. An absolute path on WinNT begins with a drive
letter followed by a colon, while on Unix it begins with a slash. So if I
specify an absolute path for the script, it will only work in one of the
systems.
2. The specification of environment variables is different. On WinNT, an
environment variable is specified using %var%, while on Unix it is specified
using $var. So I cannot use an environment variable to specify the path to
the script. An exception to this is the CVSROOT variable, but since on WinNT
it begins (in our case) with ":local:", it also cannot be used to specify
the path.
I have two solutions to this problem, both are inelegant and somewhat
complicated.
Is there some standard way of dealing with this problem?
Thanks,
Shlomo