Skip to content
Permalink
master
Switch branches/tags
Go to file
 
 
Cannot retrieve contributors at this time
59 lines (44 sloc) 1.71 KB
# Thunderbird turbo.me file
# https://github.com/turboapps/turbome/tree/master/thunderbird
#
# Licensed under the Apache License, Version 2.0
# http://www.apache.org/licenses/LICENSE-2.0
requires privilege:admin
meta title="thunderbird"
meta namespace="mozilla"
meta name="thunderbird"
###################################
# Pull dependency images
###################################
using wget,python:3.4.4
###################################
# Download and install
###################################
cmd "mkdir @SYSDRIVE@\Workspace"
workdir @SYSDRIVE@\Workspace
# Install "requests" module for python
cmd "pip install requests --quiet"
# Get last version tag
batch
echo import sys > getRelease.py
echo import requests >> getRelease.py
echo import re >> getRelease.py
echo host = "https://www.mozilla.org/en-US/thunderbird/" >> 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 print(re.findall('https:\/\/download.mozilla.org\/\?product=thunderbird-(\d*(?:.\d+)*)[^"]*', r.text )[0]) >> getRelease.py
cmd python getRelease.py
var tag = last
# Download and install last version
cmd "wget -q -O install.exe --no-check-certificate --no-verbose ""https://download.mozilla.org/?product=thunderbird-%tag%&os=win&lang=en-US"""
cmd install.exe -ms
# Set startup file
startup file ("@PROGRAMFILESX86@\Mozilla Thunderbird\thunderbird.exe")
###################################
# Clean up
###################################
workdir @SYSDRIVE@\
cmd "rmdir @SYSDRIVE@\Workspace /s /q"
cmd "rmdir @SYSDRIVE@\wget /s /q"
cmd "rmdir @SYSDRIVE@\Python34 /s /q"
meta tag=tag