From: Penny Leach Date: Mon, 29 May 2006 09:35:25 +0000 (+1200) Subject: beginnings of deployment script X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=5460da185b44be455f0b9cb7ced9dddfab85c577;p=s9y.git beginnings of deployment script --- diff --git a/deploy.pl b/deploy.pl new file mode 100644 index 0000000..3c0a88f --- /dev/null +++ b/deploy.pl @@ -0,0 +1,45 @@ +#!/usr/bin/perl + +use strict; +use Data::Dumper; +use Getopt::Long; + + +my $host = 'penny@she.geek.nz'; +my $docroot = '/var/www/she.geek.nz/htdocs/'; + +my $exclude= join(' ' ,qw/ + --exclude CVS + --exclude +* + --exclude .svn + --exclude *.patches + --exclude *.rej + --exclude *.orig + --exclude *-old + --exclude *~ + --exclude *-dist + --exclude *.dist + --exclude *.bak.* + --exclude .DS_Store + --exclude .git + --exclude gallery + --exclude stats + --exclude uploads + --exclude templates_c + --exclude work + --exclude media + --exclude debian + --exclude deploy.pl + --exclude git + --exclude serendipity_config_local.inc.php + /,'--exclude \#*\#' ); + + +my $ssh = '/usr/bin/ssh'; +my $rsync = '/usr/bin/rsync'; +my $grep = '/bin/grep'; + +my $cmd = "rsync --recursive --copy-links --perms --delete $exclude ./ $host:$docroot"; + +print $cmd; +print "\n";