MOD refactoring haskell...
[pompage.git] / mise_en_prod.rb
index cda6118..f70feac 100644 (file)
@@ -1,12 +1,15 @@
-dest = "Z:\\var\\www\\divx"\r
-\r
-#if $*.length < 1\r
-#   puts 'Usage: mise_en_prod.rb destination'\r
-#   exit 1\r
-#end\r
-\r
-dest = $*[0] if $*.length > 1\r
-\r
-['xml', 'xsl', 'js', 'css', 'img', 'xpi'].each{|rep|\r
-   `cp -Ru #{rep} #{dest}`\r
-}\r
+#!/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`