[prev in list] [next in list] [prev in thread] [next in thread] 

List:       garnome-list
Subject:    Watchdog script is now powered by Zenity
From:       "Lucas Mazzardo Veloso" <lmveloso () din ! uem ! br>
Date:       2007-01-25 23:19:55
Message-ID: 2225.201.15.55.33.1169767195.squirrel () webmail ! din ! uem ! br
[Download RAW message or body]

Hi guys,

Now the convenience script 'watchdog' is powered by Zenity
because I've found just the 'beep!' approach itself ineffective warning
me, especially with a (loud) music on the background!

Avoid letting your CPU idle again 'cause you was stuck in middle of
something really important and you didn't realize the build has stopped.

Hopefully it could help you to:
1) Always have a complete log (to unattended builts)
2) Answare the "How much does it take to finish?" question
3) And warn you as soon as it stops/finishes.

So, it's almost an 'all-your-problems-has-gone' thing.. :)
Joke aside, just grab it.

Cheers,
Lucas

PS: Does 'watchdog' mean correctly in this context?

garnome@crossfire:/opt/garnome-2.17.90/desktop$ ../watchdog.sh make
paranoid-install
Running    : make paranoid-install
Started at : 20:24 01/25/07

 (...)




-----------------------------------------
DIN - WebMail.
http://www.din.uem.br/
["watchdog.sh" (application/x-shellscript)]

#!/bin/bash
#
# Script by Lucas Mazzardo Veloso (lmveloso at din uem br)
#
# Example usage:
#        ./watchdog.sh make parnoid-install
#
# If you want to see the output run:
#       tail -f $LOG_FILE
#
# Dependencies:
#       'zenity' to display graphical dialog boxes
#       'beep' to ... Beep! :)

LOG_FILE=garnome-build.log

ERROR_SONG="beep -l 50 -n -f 370 -l 50 -n -f 523.2 -l 50 -n -f 662.3 -l 50 -n -f 937 \
-l 50 -n -f 349.2 -l 50 -n -f 493.9 -l 50 -n -f 587.3 -l 50 -n -f 884.4 -l 50 -n -f \
329.6 -l 50 -n -f 466.2 -l 50 -n -f 554.3 -l 50 -n -f 834.7 -l 150"

SUCCESS_SONG="beep -f 261.6 -n -f 329.6 -l 100 -n -f 392 -l 150 -n -f 523.2 -l 300 -n \
-f 392 -l 200 -n -f 523.2 -l 300"

echo "Running    :" $1 $2
echo Started at : `date +"%R %D"`

$1 $2 > $LOG_FILE 2>&1 && \
(       \
        echo Finished at: `date +"%R %D"`; \
        echo >> $LOG_FILE; echo Finished at: `date +"%R %D"` >> $LOG_FILE; \
        `$SUCCESS_SONG` &\
        zenity --info --text "Garnome command '$1 $2' has successfully finished!"\
)       \
 ||     \
(
        echo "Failed at  :" `date +"%R %D"`;\
         echo >> $LOG_FILE; echo Failed at: `date +"%R %D"` >> $LOG_FILE; \
        `$ERROR_SONG`& \
        zenity --error --title "Garnome command '$1 $2' has Failed!" --text "`tail \
$LOG_FILE`" \ )



-- 
garnome-list mailing list
garnome-list@gnome.org
http://mail.gnome.org/mailman/listinfo/garnome-list


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic