mrmp/__init__.py

61 lines
1.2 KiB
Python
Raw Normal View History

2021-10-09 10:29:37 +00:00
#! /usr/bin/env python3
2021-10-08 21:31:53 +00:00
2021-10-09 12:01:50 +00:00
import sys
2021-10-08 21:31:53 +00:00
import arguments
2021-10-09 12:01:50 +00:00
import remote
2021-10-09 10:25:45 +00:00
import repository
def build(repository, arguments):
print('Build:')
# TODO identify
print('TODO identify')
# TODO extract
print('TODO extract')
# TODO apply
print('TODO apply')
# TODO archive
print('TODO archive')
def check(repository, arguments):
print('Check:')
# TODO prepare threads
print('TODO prepare threads')
# TODO run threads
print('TODO run threads')
# TODO watch threads
print('TODO watch threads')
def info(repository, arguments):
print(repository)
2021-10-09 12:01:50 +00:00
def sync(repository, args):
2021-10-09 10:25:45 +00:00
print('Sync:')
2021-10-09 12:01:50 +00:00
r = remote.Remote(args)
print(r)
for architecture in args[arguments.ARCHITECTURES]:
print(r.fetch_latest_distribution(architecture))
2021-10-09 10:25:45 +00:00
# TODO prepare temporary directory
print('prepare…')
# TODO fetch
print('fetch…')
# TODO purge useless files
print('purge…')
# TODO clean temporary directory
print('clean…')
2021-10-08 21:31:53 +00:00
def main():
args = arguments.parse()
2021-10-09 10:25:45 +00:00
repo = repository.Repository(args)
func = getattr(sys.modules[__name__], args[arguments.ACTION])
func(repo, args)
2021-10-08 21:31:53 +00:00
if __name__ == '__main__':
main()