Skip to content
Snippets Groups Projects
Commit 6da39164 authored by birkhoff's avatar birkhoff
Browse files

updated downloadCSPM Task is now 'downloadCli2' please use gradle downloadCli2...

updated downloadCSPM Task is now 'downloadCli2' please use gradle downloadCli2 for execution of task downloadCli and automatic download of CSPM Libraries for all OS
parent 99737118
No related branches found
No related tags found
No related merge requests found
...@@ -100,45 +100,54 @@ task downloadCli << { ...@@ -100,45 +100,54 @@ task downloadCli << {
} }
task downloadCSPM ( type:Exec ) {
def targetdir = workspacePath+"de.prob.core/lib/"
if ( Os.isFamily(Os.FAMILY_WINDOWS) ) task downloadCli2 ( type: Exec ) {
{
println "Downloading CSPM for Windows" def dir = workspacePath+'de.prob.core/prob/'
File f = new File(targetdir+"cspm.exe") delete file(dir)
f.delete() new File(dir).mkdirs()
download( "http://nightly.cobra.cs.uni-duesseldorf.de/cspm/cspm-windows", targetdir+"cspm.exe" )
} ['leopard64':'macos','linux':'linux','linux64':'linux64','win32':'windows'].each {
else if ( Os.isFamily(Os.FAMILY_MAC) ) def n = it.getKey()
{
File f = new File(targetdir+"cspm") def targetdir = dir+it.getValue()
f.delete() def targetzip = dir+"probcli_${n}.zip"
print "Downloading CSPM for MAC "+Os.OS_ARCH def url = "http://nightly.cobra.cs.uni-duesseldorf.de/cli/probcli_${n}.zip"
if( Os.OS_ARCH.contains("64") ){ download(url,targetzip)
download( "http://nightly.cobra.cs.uni-duesseldorf.de/cspm/cspm-leopard64", targetdir+"cspm" ) FileTree zip = zipTree(targetzip)
}else{ copy {
download( "http://nightly.cobra.cs.uni-duesseldorf.de/cspm/cspm-leopard", targetdir+"cspm" ) from zip
into targetdir
} }
commandLine 'chmod', 'a+x', targetdir+"cspm" delete file(targetzip)
} }
else if( Os.isFamily(Os.FAMILY_UNIX) )
{ def targetdir = dir+"windows/"
File f = new File(targetdir+"cspm") def targetzip = targetdir+"windowslib.zip"
f.delete() download("http://nightly.cobra.cs.uni-duesseldorf.de/cli/windowslib.zip",targetzip)
println "Downloading CSPM for Linux "+Os.OS_ARCH FileTree zip = zipTree(targetzip)
if( Os.OS_ARCH.contains("64") ){ copy {
download( "http://nightly.cobra.cs.uni-duesseldorf.de/cspm/cspm-linux64", targetdir+"cspm" ) from zip
}else{ into targetdir
download( "http://nightly.cobra.cs.uni-duesseldorf.de/cspm/cspm-linux32", targetdir+"cspm" )
} }
commandLine 'chmod', 'a+x', targetdir+"cspm" delete file(targetzip)
['leopard64':'macos','linux32':'linux','linux64':'linux64'].each {
def n = it.getKey()
targetdir = dir+it.getValue()
download( "http://nightly.cobra.cs.uni-duesseldorf.de/cspm/cspm-"+n, targetdir+"/cspm" )
} }
commandLine 'chmod', 'a+x', dir+'linux'+'/cspm', dir+'linux64'+'/cspm', dir+'macos'+'/cspm'
//commandLine 'chmod', 'a+x', dir+'*'+'/cspm'
download( "http://nightly.cobra.cs.uni-duesseldorf.de/cspm/cspm-windows", dir+"windows"+"/cspm.exe" )
} }
completeInstall.dependsOn downloadCli completeInstall.dependsOn downloadCli
completeInstall.dependsOn subprojects.setClassPath completeInstall.dependsOn subprojects.setClassPath
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment