Permalink
Cannot retrieve contributors at this time
# | |
# Mercurial turbo.me file | |
# https://github.com/turboapps/turbome/tree/master/mercurial | |
# | |
# Licensed under the Apache License, Version 2.0 | |
# http://www.apache.org/licenses/LICENSE-2.0 | |
meta title="Mercurial" | |
meta namespace="mercurial" | |
meta name="mercurial" | |
################################### | |
# Pull dependency images | |
################################### | |
layer microsoft/vcredist:2008 | |
using wget,7-zip,python:3.4.1 | |
################################### | |
# Download and install | |
################################### | |
cmd pip install requests --quiet | |
# Create app directory | |
cmd mkdir c:\ghost | |
workdir C:\ghost | |
batch | |
echo import sys > getTag.py | |
echo import requests >> getTag.py | |
echo import re >> getTag.py | |
echo host = 'http://mercurial.selenic.com/wiki/Download' >> getTag.py | |
echo headers = {'User-Agent': 'Mozilla/5.0 (Windows NT 6.3; WOW64; rv:41.0) Gecko/20100101 Firefox/41.0'} >> getTag.py | |
echo r = requests.get(host , headers=headers, timeout=10) >> getTag.py | |
echo print(re.findall('Mercurial-(\d?\.\d?\.\d*\.*\d*)\s*\(32-bit exe\)', r.text )[0]) >> getTag.py | |
cmd python getTag.py | |
var tag = last | |
# Download and unzip | |
cmd "wget --no-check-certificate -O mercurial.exe http://mercurial.selenic.com/release/windows/Mercurial-%tag%.exe" | |
cmd mercurial.exe /VERYSILENT | |
cmd del mercurial.exe /Q | |
cmd del getTag.py /Q | |
################################### | |
# Startup File | |
################################### | |
################################### | |
# Environment Variables | |
################################### | |
env PATH = "@PROGRAMFILESX86@\Mercurial" | |
################################### | |
# Clean up | |
################################### | |
workdir c:\ | |
cmd rmdir c:\wget /s /q | |
cmd rmdir c:\Python34 /s /q | |
meta tag=tag |