This is the mail archive of the cygwin@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: pathing issues script failure


Scott,

You're re-inventing the wheel, here.

Learn about "cygpath", for starters.

Also, a new package called "cyg-wrapper.sh" was recently released. It's an attempt at a generic bridging script between Cygwin command interpreters and Windows-native programs. I have yet to evaluate it, so I can't tell you more than that it exists.

I've done similar things (in more specific form) to make access to the Java SDK tools accessible from Cygwin scripts in such a way that the same scripts would be useful on a Unix / Linux / POSIX system.


Here are some hints:

- Quote your variables extensively. Spaces in file name are far more common under Windows and latent lack-of-quoting bugs in scripts that originate on Unix systems will often become manifest on Windows (including under Cygwin).

- Don't put your class files at the root of a file system volume unless perhaps you have a file system volume dedicated to that purpose.

- Don't assume that all your top-level packages are "com." There are third-party tools that reside in other top-level package: "edu," "org," "gnu" etc.

- Chmod has a recursive option, "-R", that obviates the use of things like "find ... |xargs chmod ..."

- Windows is just as happy with forward slashes even in its native format, so save yourself the grief of using backslashes and stick to forward slashes throughout. Cygpath has a "mixed-mode" option "-m" or "--mixed" that converts to Windows format but uses forward slashes.

Good luck.

Randall Schulz
Mountain View, CA USA


At 09:05 2002-12-10, Scott Purcell wrote:
Hello,
I am writing a simple shell script and I am running into some roadblocks. I am sure it is something I am doing, or the way I have configured the system? Anyway, the problem is in the following script, I have to type in /cygdrive/c, to reach the c drive.

But for some reason this script fails when it has to put the output away. It switches the / unix style slashes back to windows? I am on win2000.
I am trying to get this working, does anyone know what is wrong, or what I should change to get this rolling?

Thanks,
Scott

...

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]