This repository has been archived by the owner on Nov 17, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
gen_fileserver.rb
executable file
·67 lines (61 loc) · 2.41 KB
/
gen_fileserver.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
#!/usr/bin/env ruby
# creates a fileserver
DstRoot = '/opt/fileserver/elexis'
IndigoSR2 = 'eclipse-rcp-indigo-SR2' # Needed for Elexis 2.1.7
IndigoBaseURL = 'http://mirror.switch.ch/eclipse/technology/epp/downloads/release/indigo/SR2'
MedelexisURL = "http://ftp.medelexis.ch/downloads_opensource"
JunoBaseURL = 'http://mirror.switch.ch/eclipse/technology/epp/downloads/release/juno/R'
Juno = 'eclipse-rcp-juno'
LibURL = "#{MedelexisURL}/develop"
JubulaURL = "#{MedelexisURL}/jubula"
BoxesURL = "#{MedelexisURL}/boxes"
LatexURL = 'http://mirror.switch.ch/ftp/mirror/tex/macros/latex/contrib'
require 'fileutils'
[ 'eclipse','jubula','latex', 'lib', 'boxes' ].each {
|subdir|
FileUtils.makedirs("#{DstRoot}/elexis/#{subdir}")
}
def getFileFromBaseURL(target, url, files)
files.each {
|aFile|
cmd = "wget --timestamping #{url}/#{aFile}"
FileUtils.makedirs(target)
Dir.chdir(target)
puts "cd #{target} && #{cmd}"
system(cmd)
}
end
def getEclipse(target, url, release)
[ "win32.zip", "linux-gtk.tar.gz", "linux-gtk-x86_64.tar.gz", "macosx-cocoa-x86_64.tar.gz"].each {
|variant|
fileName = "#{release}-#{variant}"
getFileFromBaseURL(target, url, [fileName])
}
end
# Use MedelexisURL as I cannot find old releases of Jubula on the Eclipse Download site
def getJubula(target, url, release, variants)
variants.each {
|ext|
getFileFromBaseURL(target, url, ["#{release}#{ext}"])
}
end
getFileFromBaseURL(DstRoot + '/latex', LatexURL, ['floatflt.zip'])
getEclipse(DstRoot + '/eclipse', IndigoBaseURL, IndigoSR2)
# getEclipse(DstRoot + '/eclipse', JunoBaseURL, Juno)
# getJubula('https://s3.amazonaws.com/jubula/','setup', ['.exe', '.sh','.dmg'])
getJubula(DstRoot + '/jubula', JubulaURL, 'jubula_setup_5.2.00266', ['.sh'])
getJubula(DstRoot + '/jubula', JubulaURL, 'jubula_setup_6.0.01011', ['.sh'])
getFileFromBaseURL(DstRoot + '/lib', LibURL,
[
'ant-contrib.jar',
'demoDB_elexis_2.1.5.4.zip',
'fop-1.0-bin.zip',
'izpack-compiler.jar',
'jdom.jar',
'medelexis-packager.jar',
'org.eclipse.mylyn.wikitext.core.jar',
'org.eclipse.mylyn.wikitext.textile.core.jar',
'scala-compiler.jar',
'scala-library.jar'
])
getFileFromBaseURL(DstRoot + '/boxes', BoxesURL, ['Elexis-Squeeze-i386.box'])