Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

EvanK's scratchpad

by EvanK (Chaplain)
on Jan 26, 2006 at 17:18 UTC ( [id://525780]=scratchpad: print w/replies, xml ) Need Help??

#!/usr/bin/perl -T use strict; use CGI; my $cgi = new CGI; if($cgi->param('update')) { # update the project working copy my $output = `svn up /home/ekaufman/svn/proj1 2>&1`; # output the update page print <<"HTMLCODE"; Content-Type: text/html; charset=utf-8 <html> <body> <form method="get" target="_self"> <input type="hidden" name="update" value="1" /> <input type="submit" value="Update" onclick="this.disabled = true; + this.value = 'Updating...'" > </form> </body> </html> HTMLCODE # if anything other than the current revision (ie: an update or an e +rror), mail me the output if($output !~ m/\A(?:\n*)At revision \d+.(?:\n*)\z/msx) { open(MAIL, "|/usr/lib/sendmail -t") or die('Couldnt send mail'); print MAIL <<"MAILCONTENT"; To: ekaufman\@mycompany.com Subject: Project updated... Output from svn up: -- output -- . MAILCONTENT close(MAIL); } } # otherwise, print a blank page print "Content-Type: text/html; charset=utf-8\n\n";
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others having a coffee break in the Monastery: (2)
As of 2025-07-07 20:01 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.