View previous topic :: View next topic |
Author |
Message |
fuji Tux's lil' helper
Joined: 26 Apr 2002 Posts: 111
|
Posted: Sat Apr 27, 2002 11:07 pm Post subject: a bash script to auto-emerge |
|
|
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 |
|
|
dArkMaGE Apprentice
Joined: 20 Apr 2002 Posts: 152
|
Posted: Sat Apr 27, 2002 11:55 pm Post subject: |
|
|
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 |
|
|
fuji Tux's lil' helper
Joined: 26 Apr 2002 Posts: 111
|
Posted: Sun Apr 28, 2002 12:04 am Post subject: |
|
|
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 |
|
|
Nitro Bodhisattva
Joined: 08 Apr 2002 Posts: 661 Location: San Francisco
|
Posted: Sun Apr 28, 2002 12:05 am Post subject: |
|
|
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 |
|
|
fuji Tux's lil' helper
Joined: 26 Apr 2002 Posts: 111
|
Posted: Mon Apr 29, 2002 1:06 am Post subject: |
|
|
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 |
|
|
DArtagnan l33t
Joined: 30 Apr 2002 Posts: 942 Location: Israel, Jerusalem
|
Posted: Mon May 06, 2002 6:27 pm Post subject: time |
|
|
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 |
|
|
Nitro Bodhisattva
Joined: 08 Apr 2002 Posts: 661 Location: San Francisco
|
Posted: Mon May 06, 2002 8:32 pm Post subject: |
|
|
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 |
|
|
squanto Guru
Joined: 20 Apr 2002 Posts: 524 Location: Rochester, NY, USA
|
Posted: Wed May 08, 2002 3:53 am Post subject: |
|
|
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 |
|
|
|