[ale] Re: Simple bash question

Paul Cartwright ale at pcartwright.com
Mon Jan 28 17:31:36 EST 2008


On Mon January 28 2008, Doctor Who wrote:
> > On a regular basis, I download code from CVS and then do the same
> > steps to build. ?I have a directory that contains a number of other
> > directories. ?I go into several of these directories (always the same
> > ones) and do a:
> >
> > ./autogen.sh
> > make
> > **SWITCH TO ROOT AND THEN**
> > make install
> >
> > I see the benefits in scripting this exercise. ?The flow is something
> > like:
> >
> > cd directory
> > $ ./autogen.sh
> > $ make
> > $ su -
> > Password: XXX
> > # make install
> > #exit
> > $ cd ../next_directory
> > $ ./autogen.sh
> > $ make
> > $ su -
> > Password: XXX
> > # make install
> > #exit
> > $cd ../third_directory
> >
> > ...ETC...
> >
> > Just curious how this might be accomplished with a bash script. ?If
> > there was an error kicked back at any step, it would be nice to say as
> > such.
> >
> > Thanks for any help.
>
> Anyone??

why do you have to exit each time??

you can do this with a here document..


-- 
Paul Cartwright
Registered Linux user # 367800
Registered Ubuntu User #12459



More information about the Ale mailing list