X-Git-Url: http://git.euphorik.ch/?p=pompage.git;a=blobdiff_plain;f=mise_en_prod.rb;h=f70feac2d4e66f2f313a168b18a26d02ebd38d29;hp=473156b414ec4d04f787017cb915fa05d0dd3870;hb=HEAD;hpb=6a3e9e285bd76141ce1475f3ecc0c3f220a5c968 diff --git a/mise_en_prod.rb b/mise_en_prod.rb index 473156b..f70feac 100644 --- a/mise_en_prod.rb +++ b/mise_en_prod.rb @@ -1,14 +1,15 @@ -dest = "Z:\\var\\www\\divx" - -#if $*.length < 1 -# puts 'Usage: mise_en_prod.rb destination' -# exit 1 -#end - -dest = $*[0] if $*.length > 1 - -# pour windows -['xml', 'xsl', 'js', 'css', 'img'].each{|rep| - `mkdir #{dest}\\#{rep}` - `xcopy /Y #{rep} #{dest}\\#{rep}` -} \ No newline at end of file +#!/usr/bin/ruby + +# la destination +$dest = 'gburri@euphorik.ch:web/divx' +$dest = $*[0] if $*.length > 1 + +# les options communes +$opt = '--delete' + +`rsync $opt css/yopyop.css #{$dest}/css` +`rsync $opt -r img/* #{$dest}/img` +`rsync $opt js/yopyop.js #{$dest}/js` +`rsync $opt xml/divx.xml #{$dest}/xml` +`rsync $opt xpi/divxlist.xpi #{$dest}/xpi` +`rsync $opt xsl/yopyop.xsl #{$dest}/xsl`