comparison data_manager/upload_novoalign_lic.py @ 1:c2002302e045 draft

planemo upload for repository https://github.com/zipho/data_manager_novoalign_license_uploader commit be79b240ea4f15deeaa8dfaf1a221bfbb23cc5e7
author sanbi-uwc
date Mon, 29 Feb 2016 06:57:55 -0500
parents
children
comparison
equal deleted inserted replaced
0:0b64aa6d4214 1:c2002302e045
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")