MOD refactoring haskell...
[pompage.git] / mise_en_prod.rb
index 8830586..f70feac 100644 (file)
@@ -1,12 +1,15 @@
-if $*.length < 1\r
-   puts 'Usage: mise_en_prod.rb destination'\r
-   exit 1\r
-end\r
-\r
-dest = $*[0]\r
-\r
-# pour windows\r
-['xml', 'xsl', 'js', 'css'].each{|rep|\r
-   `mkdir #{dest}\\#{rep}`\r
-   `xcopy /Y #{rep} #{dest}\\#{rep}`\r
-}
\ 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`