Hello!
I have a specific need for a script :
1. extract latest CVS
2. build the extracted snapshot (configure + make)
3. if successful, stop service, copy generated binary to a directory, restart service
4. mail me all output + time taken in each step (cvs retrieval, configure and make) + is service running
So far, I have 1 and 2 running :
Code:
#!/bin/bash
# Automatic MLDonkey compilation from CVS
# Run as root in home directory
cvs -z9 -d:pserver:anonymous@cvs.sv.gnu.org:/sources/mldonkey co -P mldonkey
cd mldonkey
./configure
make
echo "MLDonkey build complete."
What is the best way to implement the remaining steps? Also, if I run this as a cron job, will I get two mails (from successful cronjob + script's own mail) ?
Thanks for any help!