LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 09-12-2011, 01:11 PM   #1
vreader
LQ Newbie
 
Registered: May 2011
Posts: 4

Rep: Reputation: Disabled
running multi-builds with bash shell script


hi all,
I am trying to optimize a build script I have by running multiple builds at the same time.
Here's what I have:
I currently have a shell script written to build several libraries sequentially and there are no dependencies between them, so I wish to reduce the build time. I am logging all the build output (including warings, errors, etc...) and I wish to keep the same output.

I wanted to see if I can do something along the lines of multi-threading (or any other method) to run these builds in parallel and then concatenate the build outputs when done without going to a different scripting language.

The question I am trying to ask for help here about is what can I do to get these builds run in parallel rather than in a sequence?

your help is greatly appreciated...
vreader
 
Old 09-12-2011, 01:42 PM   #2
lithos
Senior Member
 
Registered: Jan 2010
Location: SI : 45.9531, 15.4894
Distribution: CentOS, OpenNA/Trustix, testing desktop openSuse 12.1 /Cinnamon/KDE4.8
Posts: 1,144

Rep: Reputation: 217Reputation: 217Reputation: 217
Since I'm just guessing what are you doing (I dont know about build scripts) I will try to put you in the direction of
bash running commands in parallel
and hopefully you will find what you need.

There's many possibilities, like:
1. <># command &
2. <># nohup command
3. running a "SCREEN" and inside multiple 'screen's also running your script
etc...


good luck

Last edited by lithos; 09-12-2011 at 01:46 PM.
 
Old 09-12-2011, 01:57 PM   #3
vreader
LQ Newbie
 
Registered: May 2011
Posts: 4

Original Poster
Rep: Reputation: Disabled
thanks lithos.

For example - I wish to build the following sourcecode libraries (libxml2, libxslt, etc...)

I will build each of them by executing "./configure" and "make" (I do not need to "make install" - I am interested in some files they compile and build).

What I currently do is untar the source code for libxml2 then run "./configure" then "make clean" then "make"
once its done, I will do the same for libxslt, so on and so forth with some other libraries...

What I wanted is to figure out a way to basically run both at the same time instead of waiting for one to complete before I proceed to the next.

Hope this clears what I am attempting to do a bit more...

This is part of a bigger project so I cannot run from commandline the "command &" but I will look into the other two suggestions.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Running a bash or shell script before slim linuxpicaxe Linux - Software 2 06-08-2011 05:31 PM
Shell Script: run multi for-loop at the same time? Dr_Death_UAE Programming 2 11-10-2009 10:09 AM
in bash shell how to run shell script during startup rammohan04 Red Hat 2 07-31-2009 02:07 AM
Bash script not running on shell login. uncle-c Linux - Newbie 8 02-21-2009 09:41 AM
running a shell script which invokes another shell program!!! raghu123 Programming 1 08-04-2008 09:10 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 07:20 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration