Skip to content
Switch branches/tags
Go to file
Cannot retrieve contributors at this time
58 lines (37 sloc) 1.21 KB
# sbt file
# Licensed under the Apache License, Version 2.0
meta title="sbt"
meta namespace="sbt"
meta name="sbt"
layer jre:8
using wget,python:3.4.1
cmd pip install requests --quiet
cmd mkdir c:\Workspace
workdir c:\Workspace
echo import sys >
echo import requests >>
echo import re >>
echo host = "" >>
echo headers = {'User-Agent': 'Mozilla/5.0 (Windows NT 6.3; WOW64; rv:41.0) Gecko/20100101 Firefox/41.0'} >>
echo r = requests.get(host , headers=headers, timeout=10) >>
echo print(list(re.findall('^"(.*/(\d*\.\d*\.\d*).*.msi)^"', r.text )[0])) >>
cmd python
var data = last
cmd "python -c ""print(%data%[0])"""
var url = last
cmd "python -c ""print(%data%[1])"""
var tag = last
cmd "wget -O sbt.msi --no-check-certificate %url%"
cmd "sbt.msi /qn"
env PATH = "@PROGRAMFILESX86@\sbt\bin"
workdir c:\
cmd rmdir c:\Workspace /s /q
cmd rmdir c:\wget /s /q
cmd rmdir c:\Python34 /s /q
meta tag=tag