Skip to content
Permalink
master
Switch branches/tags
Go to file
 
 
Cannot retrieve contributors at this time
68 lines (53 sloc) 1.91 KB
# FileZilla turbo.me file
#
# Licensed under the Apache License, Version 2.0
# http://www.apache.org/licenses/LICENSE-2.0
requires privilege:admin
###################################
# Set metadata
###################################
meta title = "FileZilla"
meta namespace = "filezilla"
meta name = "filezilla"
###################################
# Get build dependencies
###################################
using turbo/turboscript-tools:2016.5.5
###################################
# Download installer
###################################
cmd mkdir @SYSDRIVE@\Workspace
workdir @SYSDRIVE@\Workspace
batch
echo import sys > script.py
echo import re >> script.py
echo import requests >> script.py
echo host = "https://filezilla-project.org/download.php?show_all=1" >> script.py
echo headers = {'User-Agent': 'Mozilla/5.0 (Windows NT 6.3; WOW64; rv:41.0) Gecko/20100101 Firefox/41.0'} >> script.py
echo r = requests.get(host , headers=headers, timeout=10) >> script.py
echo url = re.findall('a href="(.*_win32-setup.exe.*)"',r.text)[0] >> script.py
echo filename = re.findall('.*/(.*FileZilla.*exe)', url)[0] >> script.py
echo version = re.findall('FileZilla_(.*)_win32-setup.exe', filename)[0] >> script.py
echo print([url, filename, version]) >> script.py
cmd python script.py
var res = last
cmd "python -c ""print(%res%[0])"""
var url = last
cmd "python -c ""print(%res%[1])"""
var filename = last
cmd "python -c ""print(%res%[2])"""
var version = last
meta tag = version
cmd "wget %url% --no-check-certificate"
###################################
# Install
###################################
cmd "%filename% /S /D=@SYSDRIVE@\FileZilla"
startup file ("@SYSDRIVE@\FileZilla\filezilla.exe")
###################################
# Clean up
###################################
workdir c:\
cmd powershell -NoProfile -Command "Import-Module Turbo; Remove-BuildTools"
cmd rmdir c:\Workspace /s /q
cmd rmdir c:\TurboBuildTools /s /q