Add driver/run.sh since this is fairly useful.
This commit is contained in:
Родитель
48ae834d02
Коммит
2b8e63c451
8
README
8
README
|
@ -39,7 +39,13 @@ Setting up (3):
|
|||
(a) Add a database entry for the machine configuration.
|
||||
(b) Edit awfy.config to match the build architecture you want, and machine
|
||||
database entry.
|
||||
(c) Add a cronjob to run dostuff.py periodically. AWFY.com runs every 30min.
|
||||
(c) Run dostuff.py periodically - Mozilla uses "run.sh" which will run
|
||||
continuously, since a cronjob could run overlapping jobs.
|
||||
|
||||
# Note, interrupting dostuff.py can cause problems with subversion, for
|
||||
# example, the WebKit repository may become stuck and need an svn cleanup
|
||||
# or an rm -rf and clean checkout. For sanity, run.sh will pause its next
|
||||
# run if it sees a /tmp/awfy lock in place, and this can be used to wait.
|
||||
|
||||
# Note It is not safe to share multiple AWFY instances from the same
|
||||
# repository, since C++ object files are generally re-used and may
|
||||
|
|
|
@ -0,0 +1,41 @@
|
|||
#!/bin/bash
|
||||
|
||||
# Protocol for stopping AWFY:
|
||||
#
|
||||
# (1) If you want to stop it immediately:
|
||||
# screen -r
|
||||
# ctrl+c
|
||||
# rm /tmp/awfy-daemon
|
||||
# rm /tmp/awfy
|
||||
# ctrl a+d
|
||||
# Remember to start it again later!
|
||||
#
|
||||
# (2) If you want to it to stop when possible:
|
||||
# touch /tmp/awfy
|
||||
# screen -r
|
||||
# (wait for it to confirm that it's no longer running)
|
||||
# ctrl a+d
|
||||
|
||||
PATH=/opt/local/bin:/opt/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin
|
||||
if [ -e /tmp/awfy-daemon ]
|
||||
then
|
||||
echo "Already running"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
touch /tmp/awfy-daemon
|
||||
while :
|
||||
do
|
||||
if [ -e /tmp/awfy ]
|
||||
then
|
||||
echo "/tmp/awfy lock in place"
|
||||
sleep 10
|
||||
else
|
||||
cd /Users/mozilla/awfy/ia32/driver
|
||||
python dostuff.py --config=awfy-x86.config
|
||||
cd /Users/mozilla/awfy/x64/driver
|
||||
python dostuff.py --config=awfy-x64.config
|
||||
fi
|
||||
done
|
||||
rm /tmp/awfy-daemon
|
||||
|
Загрузка…
Ссылка в новой задаче