forked from ome/ome-release
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathflimfitgen.py
More file actions
executable file
·45 lines (32 loc) · 1.2 KB
/
flimfitgen.py
File metadata and controls
executable file
·45 lines (32 loc) · 1.2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
import sys
import datetime
import fileinput
from doc_generator import find_pkg, repl_all
def usage():
print "flimfitgen.py version"
sys.exit(1)
try:
version = sys.argv[1]
except:
usage()
repl = {"@VERSION@": version,
"@MONTHYEAR@": datetime.datetime.now().strftime("%b %Y")}
RSYNC_PATH = os.environ.get('RSYNC_PATH', '/ome/data_repo/public/')
PREFIX = os.environ.get('PREFIX', 'flimfit')
FLIMFIT_RSYNC_PATH = '%s/%s/%s/' % (RSYNC_PATH, PREFIX, version)
# Links to the MCR downloads
repl["@MCR_WIN@"] = "http://www.mathworks.com/supportfiles/downloads/R2014b" \
"/deployment_files/R2014b/installers/win64/MCR_R2014b_win64_installer.exe"
repl["@MCR_MAC@"] = "http://www.mathworks.com/supportfiles/downloads/R2014b" \
"/deployment_files/R2014b/installers/maci64" \
"/MCR_R2014b_maci64_installer.zip"
for x, y in (
("FLIMFIT_51_WIN", "artifacts/FLIMfit_@VERSION@_OME_5.1_x64.zip"),
("FLIMFIT_51_MAC", "artifacts/FLIMfit_@VERSION@_OME_5.1_MACI64.zip"),
):
find_pkg(repl, FLIMFIT_RSYNC_PATH, x, y)
for line in fileinput.input(["flimfit_downloads.html"]):
print repl_all(repl, line, check_http=True),