Mercurial > repos > sanbi-uwc > data_manager_novoalign_license_uploader
comparison data_manager/novoalign_license_uploader.py @ 5:d8c61b89caf2 draft
planemo upload for repository https://github.com/zipho/data_manager_novoalign_license_uploader commit bbe707e24f0baca8840603b0abb05bde8fa6d6a4
author | sanbi-uwc |
---|---|
date | Mon, 29 Feb 2016 07:34:32 -0500 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
4:3c0e34166275 | 5:d8c61b89caf2 |
---|---|
1 #!/usr/bin/env | |
2 # Zipho Masholoigu (SANBI-UWC) | |
3 | |
4 import os | |
5 import argparse | |
6 | |
7 import logging | |
8 log = logging.getLogger( __name__ ) | |
9 | |
10 LICENSE_TARGET_DIRECTORY = "novoalign" | |
11 | |
12 #Parse Command Line | |
13 parser = argparse.ArgumentParser(description="Upload the nonoalign license to the tool-data path") | |
14 parser.add_argument('--license_filename') | |
15 parser.add_argument('--license_dir') | |
16 | |
17 args = parser.parse_args() | |
18 filename = args.license_filename | |
19 | |
20 #create the license target directory | |
21 target_dir = args.license_dir + "/" + LICENSE_TARGET_DIRECTORY | |
22 license_file = target_dir+"/"+"license.lic" | |
23 if not os.path.isfile(license_file): | |
24 os.mkdir( target_dir ) | |
25 #move/copy license file to the tool-data path | |
26 os.rename( filename, target_dir+"/"+"license.lic") | |
27 else: | |
28 log.debug("License for novoalign seems to exists already") |