MOD déplacement de mise_en_prod.rb
[euphorik.git] / tools / mise_en_prod.rb
1 #!/usr/bin/ruby
2 =begin
3 Copyright 2008 Grégory Burri
4
5 This file is part of Euphorik.
6
7 Euphorik is free software: you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation, either version 3 of the License, or
10 (at your option) any later version.
11
12 Euphorik is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
16
17 You should have received a copy of the GNU General Public License
18 along with Euphorik. If not, see <http://www.gnu.org/licenses/>.
19 =end
20
21
22 def copy_files(dest, opt)
23 `rsync #{opt} index.html #{dest}`
24 `rsync #{opt} -r css #{dest}`
25 `rsync #{opt} -r img #{dest}`
26 #`rsync #{opt} -r js #{dest}`
27 `rsync #{opt} -r lightbox #{dest}`
28 `rsync #{opt} -r modules/include #{dest}/modules`
29 `rsync #{opt} -r modules/ebin #{dest}/modules`
30 `rsync #{opt} -r pages #{dest}`
31
32 # copie des js avec minification
33
34 end
35
36 if __FILE__ == $0
37 # la destination
38 $dest = 'gburri@euphorik.ch:/var/www/euphorik'
39 $dest = $*[0] if $*.length > 1
40
41 # les options communes
42 $opt = ''
43
44 copy_files($dest, $opt)
45 end