コード例 #1
0
ファイル: update-fiji.py プロジェクト: RobertSnapp/fiji
if len(argv) > 1 and argv[1] == '--upload-to':
	updateDirectory = argv[2]
	argv[1:3] = []
else:
	updateDirectory = '/var/www/update/'

def stripPrecompiled(string):
	if string.startswith('precompiled/'):
		return string[12:]
	return string

files = [stripPrecompiled(file) for file in argv[1:]]

Updater.MAIN_URL = 'file:' + updateDirectory
downloader = XMLFileDownloader()
downloader.start()
reader = XMLFileReader(downloader.getInputStream(), 0)

progress = StderrProgress()
checksummer = Checksummer(progress)
plugins = PluginCollection.getInstance()
if len(files) == 0:
	checksummer.updateFromLocal()
else:
	if files[0] == '--auto':
		automatic = True
		files = files[1:]
	else:
		automatic = False
	checksummer.updateFromLocal(files)
コード例 #2
0
ファイル: update-fiji.py プロジェクト: AmberLewis/fiji
if len(argv) > 1 and argv[1] == '--upload-to':
	updateDirectory = argv[2]
	argv[1:3] = []
else:
	updateDirectory = '/var/www/update/'

def stripPrecompiled(string):
	if string.startswith('precompiled/'):
		return string[12:]
	return string

files = [stripPrecompiled(file) for file in argv[1:]]

Updater.MAIN_URL = 'file:' + updateDirectory
downloader = XMLFileDownloader()
downloader.start()
plugins = PluginCollection()

progress = StderrProgress()
checksummer = Checksummer(progress)
if len(files) == 0:
	checksummer.updateFromLocal()
else:
	if files[0] == '--auto':
		automatic = True
		files = files[1:]
	else:
		automatic = False
	checksummer.updateFromLocal(files)
	# check dependencies
コード例 #3
0
    updateDirectory = argv[2]
    argv[1:3] = []
else:
    updateDirectory = '/var/www/update/'


def stripPrecompiled(string):
    if string.startswith('precompiled/'):
        return string[12:]
    return string


files = [stripPrecompiled(file) for file in argv[1:]]

Updater.MAIN_URL = 'file:' + updateDirectory
downloader = XMLFileDownloader()
downloader.start()
plugins = PluginCollection()

progress = StderrProgress()
checksummer = Checksummer(progress)
if len(files) == 0:
    checksummer.updateFromLocal()
else:
    if files[0] == '--auto':
        automatic = True
        files = files[1:]
    else:
        automatic = False
    checksummer.updateFromLocal(files)
    # check dependencies