All Forums |
Register |
Login |
Search |
Subscriptions |
My Profile |
Inbox |
Tool Warehouse |
FAQs |
Resources |
Help |
Member List |
Address Book |
Logout |
|
|
sourcing .bat files within a shell environment
|
Logged in as: Guest |
Users viewing this topic: none |
|
Login  |
|
|
sourcing .bat files within a shell environment - Sep. 2, '06, 11:00:58 AM
|
|
|
kimaldis
Posts: 6
Joined: Sep. 1, '06,
Status: offline
|
I've a number of Windows programmes - comercial, not mine - that have their environments set for them in bat files that set a number of environment variables before firing up the programme. Is there a way to source these .bat files from a shell under SFU or would I be better sourcing the environment setup part of the bats in DOS as part of the shortcut that starts up the shell in question
thanks in advance.
K.
|
|
|
RE: sourcing .bat files within a shell environment - Sep. 2, '06, 12:25:41 PM
|
|
|
Rodney
Posts: 3714
Joined: Jul. 9, '02,
From: /Tools lab
Status: online
|
A DOS BAT file isn't going to source into a ksh environment (or csh).
I'm assuming that by "source" you do mean source.
If you have the environment variables added to the System environment variables then
they will get picked up at the start of the Interix shells.
You can also create a shell script with the same settings and source it.
Paths would likely need to be left in Win32 syntax (other than PATH).
A wrapper BAT would get you the job done too.
|
|
|
RE: sourcing .bat files within a shell environment - Sep. 3, '06, 10:14:09 AM
|
|
|
kimaldis
Posts: 6
Joined: Sep. 1, '06,
Status: offline
|
>A DOS BAT file isn't going to source into a ksh environment (or csh).
I'm migrating from a Cygwin environment where a shell will happily run a bat file, but of course that wouldn't work because it's in another environment. Forgive my brain fart.
I've got it working now, after a fashion, by wrapping the tcsh startup in a bat file that sets the DOS environment for me. It's not quite as straightforward as with Cygwin where the path variable seems to come into Cygwin and on to the .exe I'm running quite happily. Until I get my head around the way SFU deals with it I'm adding specific paths to the PATH variable in my .tcshrc.
Thanks for your input, both hear and on the other couple of problems. I'm working on those and I'll post back when I'm done.
K.
|
|
|
New Messages |
No New Messages |
Hot Topic w/ New Messages |
Hot Topic w/o New Messages |
|
Locked w/ New Messages |
Locked w/o New Messages |
|
Post New Thread
Reply to Message
Post New Poll
Submit Vote
Delete My Own Post
Delete My Own Thread
Rate Posts |
|
|
|