Permalink
Cannot retrieve contributors at this time
# | |
# ruby turbo.me file | |
# https://github.com/turboapps/turbome/tree/master/ruby | |
# | |
# Licensed under the Apache License, Version 2.0 | |
# http://www.apache.org/licenses/LICENSE-2.0 | |
meta title="Ruby" | |
meta namespace="ruby" | |
meta name="ruby" | |
using wget,python:3.4.1 | |
cmd pip install requests --quiet | |
cmd mkdir c:\Workspace | |
workdir c:\Workspace | |
batch | |
echo import sys > getRelease.py | |
echo import requests >> getRelease.py | |
echo import re >> getRelease.py | |
echo host = "http://rubyinstaller.org/downloads/" >> getRelease.py | |
echo headers = {'User-Agent': 'Mozilla/5.0 (Windows NT 6.3; WOW64; rv:41.0) Gecko/20100101 Firefox/41.0'} >> getRelease.py | |
echo r = requests.get(host , headers=headers, timeout=10) >> getRelease.py | |
echo data = list(re.findall('^<a href="(.*exe.*)"^>Ruby (\d*\.\d*\.\d*)', r.text)[0]) >> getRelease.py | |
echo directory = 'Ruby'+data[1].split('.')[0]+data[1].split('.')[1] >> getRelease.py | |
echo print(data + [directory]) >> getRelease.py | |
cmd python getRelease.py | |
var data = last | |
cmd "python -c ""print(%data%[0])""" | |
var url = last | |
cmd "python -c ""print(%data%[1])""" | |
var tag = last | |
cmd "python -c ""print(%data%[2])""" | |
var dir = last | |
cmd "wget -O rubyinstaller.exe --no-check-certificate %url%" | |
cmd "rubyinstaller.exe /verysilent" | |
env path = "c:\" + dir + "\bin" | |
workdir c:\ | |
cmd rmdir c:\Workspace /s /q | |
cmd rmdir c:\wget /s /q | |
cmd rmdir c:\Python34 /s /q | |
meta tag=tag |