Checking XCOPY Exit Value in Cygwin Bash

Shane wolfpack@inbox.com
Sun Aug 6 18:07:00 GMT 2006


David Christensen wrote:
> 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.
To David,
   Thank you for the tip. Actually I am using Visual Source Safe as the 
Source Management tool.
I was considering the use of CVS, but decided against at the last moment 
because most of the fellow developers including me, had been using VSS 
for a considerable amount of time, and felt that the migration from a 
VSS to CVS would take a some time. Similarly for Make. We are primarily 
a group of developers who are conversent with MS Windows than the Unix 
environment. Cygwin basically gives us the power of bash scripting and 
the "ease" of Windows at the same time. :)

What I am trying to do is, checkout the source to the build directory 
and if there are any local changes
in my working directory copy them to the build directory, build and do a 
test run from there. This is so that I can test my code before I do the 
actual check in.

To Igor,
   Your method worked perfectly for paths with spaces too. :) Now if 
only I had a way of detecting if files were updated or not.

To Mark
   I tried it again. Unfortunately echo $? gives 0 for both the cases 
of, number of files copied = 0 and, greater than 0.
   The link I posted from MSDN 
http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/xcopy.mspx?mfr=true 
says that XCOPY returns 1 when there were no files to be copied.

So I guess I am back to square one. :(

Thanks and best regards
Shane

____________________________________________________________
GET FREE 5GB ONLINE STORAGE - Safely store your documents, photos and music online!
Visit http://www.inbox.com/storage to find out more!

--
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