Re: cd.exe
- From: Dave Yeo <dave.r.yeo@xxxxxxxxx>
- Date: Mon, 04 May 2009 23:51:30 GMT
On 05/04/09 10:30 am, Steven Levine wrote:
In<ylrLl.25483$Db2.15152@edtnps83>, on 05/04/2009
at 01:16 AM, Dave Yeo<dave.r.yeo@xxxxxxxxx> said:
Hi,
Run a script (located at http://fate.multimedia.cx/running.html) that
has a line like (before some OS/2 mods)
"rm -rf $BUILD_PATH&& mkdir $BUILD_PATH&& cd $BUILD_PATH&&
$SOURCE_PATH/configure --disable-debug --enable-gpl --enable-postproc
--enable-avfilter --enable-avfilter-lavf --enable-shared
--enable-swscale --prefix=$BUILD_PATH/install-directory&& make&& make
install",
Actually the --enable-swscale needs to be removed from above as swscale has been depreciated.
Depending on python's implementation of Popen, this should just work and
hopefully will use the value of SHELL to invode the command.
That's what I hoped but it exits within seconds and never does the rm -f $BUILD or anything else.
Quickly looking at the source of Python 2.5.2 it seems to use %COMSPEC% to load a shell (Modules\posixmodule.c)
I needed to change $BUILD_PATH to %BUILD_PATH%, replace mkdir with
mkdir.exe and have now worked around the CD problem by breaking it into
multiple CD commands with no directory separators.
FWIW, I usually find it less work to do what it takes to keep the build
scripts running under a *nix shell. Typically, I have a 4OS2 script that
sets up the build environment and invokes bash. The script translates
slashes in environment variables when it matters.
I tried running it under ash and ksh, didn't seem to make much difference.
I can use ash to run
configure but it fails to build. (k)sh.exe doesn't work for some reason
when invoked from the script though works fine from the command line.
Unluckily stderr and stdout are not displayed.
Which version of python are you running? Paul's or Andrew's.
Paul's newest seems to support most things, We went over some of the failures and he fixed them (same fixes were needed for Mercurial)
My python
setup is not quite up to building fate. It may be missing some modules.
However, I hacked the script to the point where it would attempt to invoke
process = Popen(command, shell=True, stdout=PIPE, stderr=PIPE)
Unfortunately this seems to fail for any command I supply. I'll revisit
this later today.
It works for me if the full path is specified and is not a built in command eg /bin/rm -rf %BUILD %% /bin/mkdir %BUiLD% work. I added some touch commands for debugging and even cd works if there are no path separators. I'm possibly missing some quoting.
Regards,
Steven
Dave
.
- Follow-Ups:
- Re: cd.exe
- From: Steven Levine
- Re: cd.exe
- References:
- cd.exe
- From: Dave Yeo
- Re: cd.exe
- From: Steven Levine
- Re: cd.exe
- From: Dave Yeo
- Re: cd.exe
- From: Steven Levine
- cd.exe
- Prev by Date: Re: cd.exe
- Next by Date: Re: cd.exe
- Previous by thread: Re: cd.exe
- Next by thread: Re: cd.exe
- Index(es):
Relevant Pages
|