[MacPorts] #33719: keep machines from sleep during port building

MacPorts noreply at macports.org
Thu Mar 29 09:50:59 PDT 2012


#33719: keep machines from sleep during port building
------------------------------------------+---------------------------------
 Reporter:  drechsel@…                    |       Owner:  macports-tickets@…                   
     Type:  enhancement                   |      Status:  new                                  
 Priority:  Normal                        |   Milestone:  MacPorts Future                      
Component:  base                          |     Version:  2.0.4                                
 Keywords:                                |        Port:                                       
------------------------------------------+---------------------------------

Comment(by ryandesign@…):

 Replying to [comment:5 drechsel@…]:
 > I'd like an option which makes the machine behave like raimue says:
 'shutdown -s now' after the build was finished (successfully or not), so
 in the case I know I will not attend the building machine all the time, I
 get the most energy saving possible.

 In the Terminal where the port process is running, type your shutdown
 command. (I use a sleep command myself.) It will run when the port command
 is finished. I personally use a shell script that does:
 {{{
 osascript -e 'tell app "System Events" to sleep' &
 }}}
 I save this script in my scripts folder as "sleepmac". If you want
 shutdown instead of sleep, use:
 {{{
 osascript -e 'tell app "System Events" to shut down' &
 }}}
 I save this script as "shutdownmac".

 Or you could use a new terminal and do
 "[browser:users/ryandesign/scripts/waitport waitport] && shutdownmac".

 > Play a sound or something when finished would be another nice option, by
 the way.

 I used a shell function (a wrapper around "port") to do this. But MacPorts
 1.9.0 largely broke it, since it won't work when you use "sudo", which
 since MacPorts 1.9.0 you pretty much have to. (I used to have non-root
 MacPorts installations where that wasn't necessary.)

-- 
Ticket URL: <https://trac.macports.org/ticket/33719#comment:6>
MacPorts <http://www.macports.org/>
Ports system for Mac OS


More information about the macports-tickets mailing list