diff 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
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/data_manager/novoalign_license_uploader.py	Mon Feb 29 07:34:32 2016 -0500
@@ -0,0 +1,28 @@
+#!/usr/bin/env 
+# Zipho Masholoigu (SANBI-UWC)
+
+import os
+import argparse
+
+import logging
+log = logging.getLogger( __name__ )
+
+LICENSE_TARGET_DIRECTORY = "novoalign"
+
+#Parse Command Line
+parser = argparse.ArgumentParser(description="Upload the nonoalign license to the tool-data path")
+parser.add_argument('--license_filename')
+parser.add_argument('--license_dir')
+
+args = parser.parse_args()
+filename = args.license_filename
+
+#create the license target directory
+target_dir = args.license_dir + "/" + LICENSE_TARGET_DIRECTORY
+license_file = target_dir+"/"+"license.lic"
+if not os.path.isfile(license_file):
+    os.mkdir( target_dir )
+    #move/copy license file to the tool-data path
+    os.rename( filename, target_dir+"/"+"license.lic")
+else:
+    log.debug("License for novoalign seems to exists already")