Checking XCOPY Exit Value in Cygwin Bash

David Christensen dpchrist@holgerdanske.com
Sun Aug 6 17:26:00 GMT 2006


Shane wrote:
> I am writing a automated build script for my project that will be run
> under cygwin. I will copy my updated source files to the build
> directory and if there are updated files, the executables will be
> built. To copy the source files, I had to use XCOPY since the
> directory structure should be preserved in the destination directory
> also. To copy only the updated files, I used the /D switch for XCOPY.
> Now since I want to execute the source compile only if files in the
> build directory have been updated, I have to use the exit codes of
> XCOPY inside the script.

There are standard software development tools that solve the problems
you are facing -- CVS and Make:

    http://ximbiot.com/cvs/wiki/index.php?title=Main_Page

    http://ximbiot.com/cvs/wiki/index.php?title=Main_Page


Both are included in Cygwin.  In the long run, you'd be better off
investing in a basic to intermediate understanding of both rather than
hacking together custom scripts to implement a subset of their
functionality.


David


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/



More information about the Cygwin mailing list