Skip to content
Snippets Groups Projects
Commit d94dc42c authored by Loraine Gueguen's avatar Loraine Gueguen
Browse files

Symlink banner instead of copy, in speciesDir

parent 9b4f2a91
No related branches found
No related tags found
2 merge requests!9Release 2.0 (merge dev to master),!8Release 2.0
...@@ -62,11 +62,10 @@ class DeploySpeciesStack(speciesData.SpeciesData): ...@@ -62,11 +62,10 @@ class DeploySpeciesStack(speciesData.SpeciesData):
# use the default banner instead # use the default banner instead
if "banner_path" in self.config.keys(): if "banner_path" in self.config.keys():
if not config["banner_path"] == "" and os.path.isfile(os.path.abspath(config["banner_path"])): if not config["banner_path"] == "" and os.path.isfile(os.path.abspath(config["banner_path"])):
banner_dest_path = os.path.abspath("./banner.png") banner_dest_path = os.path.join(self.species_dir, os.path.abspath("banner.png"))
logging.info("Custom banner path: %s" % self.config["banner_path"]) if not os.path.samefile(os.path.abspath(config["banner_path"]),banner_dest_path):
# if os.path.samefile(os.path.abspath(config["banner_path"]), banner_dest_path): os.symlink(os.path.abspath(self.config["banner_path"]), banner_dest_path)
# shutil.copy(os.path.abspath(self.config["banner_path"]), banner_dest_path) logging.info("Custom banner added: symlink from %s" % self.config["banner_path"])
shutil.copy(os.path.abspath(self.config["banner_path"]), banner_dest_path)
else: else:
logging.debug("Using default banner for Tripal pages") logging.debug("Using default banner for Tripal pages")
self.config.pop("banner_path", None) self.config.pop("banner_path", None)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment