Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
a bash script to auto-emerge
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
fuji
Tux's lil' helper
Tux's lil' helper


Joined: 26 Apr 2002
Posts: 111

PostPosted: Sat Apr 27, 2002 11:07 pm    Post subject: a bash script to auto-emerge Reply with quote

I was thinking about it today... what if i could write a script that would auto emerge a bunch of small programs while i was sleeping or afk.

Because, i'm still emerging some software, and i sometimes forget to check when an emerge is complete to begin another one.

Here's the jist of my script:

Code:
#!/bin/sh
emerge apache;
emerge php;
emerge samba;
emerge xmms;
emerge opera;
emerge [etc...];


I'm not a bash programmer, i just understand the very basics. Am i way off with this idea, or can this be done? If yes, i will investigate the matter further.... Just thought i'd run it by you guys first.

Another concern; is this a, for lack of a better word "good" solution? Or is it advised to emerge individually.

Thanks for reading
Back to top
View user's profile Send private message
dArkMaGE
Apprentice
Apprentice


Joined: 20 Apr 2002
Posts: 152

PostPosted: Sat Apr 27, 2002 11:55 pm    Post subject: Reply with quote

well, imho the best way is to type emerge prog1 prog2 prog3 prog4 blah blah blah
hit enter
and take a nice long nap...
emerge will automagically figure out all your dependencies and install all those programs for you in the correct order... theres no need to emerge them one at a time explicitly
:) isnt gentoo great?
Back to top
View user's profile Send private message
fuji
Tux's lil' helper
Tux's lil' helper


Joined: 26 Apr 2002
Posts: 111

PostPosted: Sun Apr 28, 2002 12:04 am    Post subject: Reply with quote

dArkMaGE wrote:
well, imho the best way is to type emerge prog1 prog2 prog3 prog4 blah blah blah
hit enter
and take a nice long nap...
emerge will automagically figure out all your dependencies and install all those programs for you in the correct order... theres no need to emerge them one at a time explicitly
:) isnt gentoo great?


I didn't know that i could just: emerge [prog1] [prog2] [etc....]

Thanks for your help! I'm going for my nap now ;)
Back to top
View user's profile Send private message
Nitro
Bodhisattva
Bodhisattva


Joined: 08 Apr 2002
Posts: 661
Location: San Francisco

PostPosted: Sun Apr 28, 2002 12:05 am    Post subject: Reply with quote

fuji wrote:
Thanks for your help! I'm going for my nap now ;)


To see how long it takes to emerge something, try running:
Code:
time emerge package1 package2
When it is all done, it will tell you the total amount of time the emerge command had been running. Next time you will have an idea how long you will need to nap. :)
_________________
- Kyle Manna

Please, please SEARCH before posting.

There are three kinds of people in the world: those who can count, and those who can't.
Back to top
View user's profile Send private message
fuji
Tux's lil' helper
Tux's lil' helper


Joined: 26 Apr 2002
Posts: 111

PostPosted: Mon Apr 29, 2002 1:06 am    Post subject: Reply with quote

Thanks for sharing the time command. I found another use for it. What i do is
Code:
 time emerge [pkg1] [pkg2] [pkg...]

And what that does is download all the files i need to do the install/emerge. I can then, type the same line minus 'time' and go and play some multi player games while i wait for the emerge to finish. Since i'm not downloading off and on, i wont lag at some times....

thanks for sharing that command too :)
Back to top
View user's profile Send private message
DArtagnan
l33t
l33t


Joined: 30 Apr 2002
Posts: 942
Location: Israel, Jerusalem

PostPosted: Mon May 06, 2002 6:27 pm    Post subject: time Reply with quote

Is possible to see the remaining time in the middle of the instalation? :-)
Pacman
_________________
All for one and one for All
--

MACPRO machine...
Back to top
View user's profile Send private message
Nitro
Bodhisattva
Bodhisattva


Joined: 08 Apr 2002
Posts: 661
Location: San Francisco

PostPosted: Mon May 06, 2002 8:32 pm    Post subject: Reply with quote

No, there really isn't anyway to calculate ahead. Too many variables involved when compiling stuff.

The time program just watches how long the program runs.
_________________
- Kyle Manna

Please, please SEARCH before posting.

There are three kinds of people in the world: those who can count, and those who can't.
Back to top
View user's profile Send private message
squanto
Guru
Guru


Joined: 20 Apr 2002
Posts: 524
Location: Rochester, NY, USA

PostPosted: Wed May 08, 2002 3:53 am    Post subject: Reply with quote

You might be able to still use the script though, if you are napping near your computer, just do the script with one line doing the
Code:
 time emerge [prog1] [prog2] &
and the second line being something like
Code:
 play /home/user/thatcoolnewmp3 &
and then you could have some nice music wake you up.
Good idea?

-Andrew
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum