Permalink
Fetching contributors…
Cannot retrieve contributors at this time
65 lines (49 sloc) 1.83 KB
# Eclipse IDE for Java Developers turbo.me file
# https://github.com/turboapps/turbome/tree/master/eclipse
#
# Licensed under the Apache License, Version 2.0
# http://www.apache.org/licenses/LICENSE-2.0
meta title="eclipse"
meta namespace="eclipse"
meta name="eclipse"
###################################
# Pull dependency images
###################################
layer jre
using turbo/turboscript-tools:2016.8.31
###################################
# Download and install
###################################
cmd "mkdir @SYSDRIVE@\Workspace"
workdir @SYSDRIVE@\Workspace
# Get last version tag
# Fetch version
batch
echo $content = Invoke-WebRequest -Uri http://www.eclipse.org/downloads/packages/ >> getUrl.ps1
echo $regex = "http://www.eclipse.org/downloads/download.php\?file=/technology/epp/downloads/release/.*win32.zip" >> getUrl.ps1
echo $content -match $regex ^| Out-Null >> getUrl.ps1
echo $webUrl = $Matches[0] >> getUrl.ps1
echo $linkPart = $webUrl.Split("=")[1] >> getUrl.ps1
echo Write-Host "http://mirror.switch.ch/eclipse$linkPart" >> getUrl.ps1
cmd powershell -File getUrl.ps1
var url = last
batch
echo $content = Invoke-WebRequest -Uri http://www.eclipse.org/downloads/packages/ >> getTag.ps1
echo $regex = "(?<= \()[0-9]+\.[0-9]+(?=\))" >> getTag.ps1
echo $content -match $regex ^| Out-Null >> getTag.ps1
echo $Matches[0] >> getTag.ps1
cmd powershell -File getTag.ps1
var tag = last
# Download and install last version
cmd "wget -O eclipse.zip --no-verbose ""%url%"""
cmd "7z x eclipse.zip -oc:\"
# Set startup file
startup file ("@SYSDRIVE@\eclipse\eclipse.exe")
###################################
# Clean up
###################################
workdir @SYSDRIVE@\
cmd powershell -NoProfile -Command "Import-Module Turbo; Remove-BuildTools"
cmd rmdir c:\Workspace /s /q
cmd rmdir c:\TurboBuildTools /s /q
meta tag=tag