3 Copyright 2008 Grégory Burri
5 This file is part of Euphorik.
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.
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.
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/>.
24 Dir
.chdir('../modules')
28 $rep_remote = '/tmp/euphorik' #'/var/www/euphorik'
29 $host = 'localhost' #"gburri@euphorik.ch:#{rep_remote}"
32 def creer_remote_rep(rep
)
34 `ssh #{$host} "mkdir #{$rep_remote}/#{rep}"`
39 creer_remote_rep('BD')
42 print
`rsync #{$opt_rsync} index.html #{$host}:#{$rep_remote}`
43 print
`rsync #{$opt_rsync} favicon.ico #{$host}:#{$rep_remote}`
44 print
`rsync #{$opt_rsync} -r css #{$host}:#{$rep_remote}`
45 print
`rsync #{$opt_rsync} -r --exclude 'autres' img #{$host}:#{$rep_remote}`
47 # copie des js avec minification
49 creer_remote_rep(rep_js
)
50 Dir
.entries(rep_js
).each
{|fichier
|
51 if fichier
[0..0] !
= "." and fichier !
= "debug.js"
52 puts
"Minimisation et copie de #{fichier}"
53 print
`tools/jsmin.rb < #{rep_js}/#{fichier} | ssh #{$host} "cat > #{$rep_remote}/#{rep_js}/#{fichier}"`
57 creer_remote_rep('modules')
58 `rsync #{$opt_rsync} -r modules/ebin #{$host}:#{$rep_remote}/modules`
59 `rsync #{$opt_rsync} -r pages #{$host}:#{$rep_remote}`