]> git.mjollnir.org Git - s9y.git/commitdiff
beginnings of deployment script
authorPenny Leach <mjollnir@titania.local>
Mon, 29 May 2006 09:35:25 +0000 (21:35 +1200)
committerPenny Leach <penny@catalyst.net.nz>
Mon, 7 Apr 2008 23:59:04 +0000 (11:59 +1200)
deploy.pl [new file with mode: 0644]

diff --git a/deploy.pl b/deploy.pl
new file mode 100644 (file)
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";