This is the mail archive of the cygwin 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: How do I make scripts my PC executable


David Christensen wrote:
Steve Holden wrote:
Well there's no need to be so defensive. A simple "that doesn't work", preferably with a following "because ..." would have been quite adequate. Now I have seen your reply to Andrew DeFaria I am somewhat better informed.
If my tone put you off, I apologize. Understand that GNU, Cygwin, Linux, *BSD, etc., are labors of love; users are expected to put effort into educating themselves, finding answers on their own, and helping others with difficulties. Requesting help on a support forum implies a willingness to learn, to do work, and to share the results. Understand that my solution is by no means the only or the best answer; I beat my head against the problem until I found something that worked, and then stopped there. If you follow my suggestion of "please test your ideas, test my solution, figure out the obvious and unobvious differences, and post your results", I suspect that we'll all have a better understanding of what's going on with Windows, Windows Explorer, cmd.exe, Cygwin, and/or Bash.
I'm always amazed how little people know about their own startup environments and the reluctance to learn more about them thus improving their environment and productivity. The -l option to bash *should* source /etc/profile and your ~/.bash_profile. Additionally it should source your .bashrc - if any of these are present. Additionally, if say run from cron, you'll have a non-interactive shell and the behavior should be slightly different. In any event it really is your responsibility to insure that your start up environment is configured correctly. Since you were obviously having difficulties there is still something wrong with *your* environment and as such I know that I, personally, would be concerned about that until I got it fixed.

We cannot debug your environment because we don't have your environment. We don't have your /etc/profile (if you made any changes) and we don't have your ~/.bash_profile either. Additionally we don't have your perl and bash scripts that you've purposely left out of the equation here. Lastly we don't even have much of a description of what exactly goes wrong when you use -l instead of sourcing /etc/profile and ~/.bash_profile nor do we have any of the error messages. How then are we to post our results?

Granted you may not care - you have a working solution and what the hell it's just two lines of code. However, as a profession I squint and say "That just ain't right" and "That's a kludgy fix" and it would bother me. I know from past experience that such things eventually have a knack of coming back and biting you in the ass later on...
--
Andrew DeFaria <http://defaria.com>
Sex: In America an obsession. In other parts of the world a fact. - Marlene Dietrich



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


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