Fixed #419 to not redo node/mongo downloads when rerunning the script.
This commit is contained in:
parent
8ea2a80088
commit
137d2b0fd4
3 changed files with 21 additions and 10 deletions
scripts/devSetup
|
@ -37,21 +37,26 @@ class Node(Dependency):
|
|||
return self.config.directory.bin_directory
|
||||
|
||||
def download_dependencies(self):
|
||||
self.downloader.download()
|
||||
self.downloader.decompress()
|
||||
install_directory = self.config.directory.bin_directory + os.sep + u"node"
|
||||
if os.path.exists(install_directory):
|
||||
print(u"Skipping Node download because " + install_directory + " exists.")
|
||||
else:
|
||||
self.downloader.download()
|
||||
self.downloader.decompress()
|
||||
def bashrc_string(self):
|
||||
return "COCO_NODE_PATH=" + self.config.directory.bin_directory + os.sep + u"node" + os.sep + "bin" + os.sep +"node"
|
||||
def install_dependencies(self):
|
||||
install_directory = self.config.directory.bin_directory + os.sep + u"node"
|
||||
#check for node here
|
||||
unzipped_node_path = self.findUnzippedNodePath()
|
||||
if self.config.system.operating_system in ["mac","linux"] and not which("node"):
|
||||
unzipped_node_path = self.findUnzippedNodePath()
|
||||
print("Copying node into /usr/local/bin/...")
|
||||
shutil.copy(unzipped_node_path + os.sep + "bin" + os.sep + "node","/usr/local/bin/")
|
||||
os.chmod("/usr/local/bin/node",S_IRWXG|S_IRWXO|S_IRWXU)
|
||||
if os.path.exists(install_directory):
|
||||
print(u"Skipping creation of " + install_directory + " because it exists.")
|
||||
else:
|
||||
unzipped_node_path = self.findUnzippedNodePath()
|
||||
shutil.copytree(self.findUnzippedNodePath(),install_directory)
|
||||
wants_to_upgrade = True
|
||||
if self.check_if_executable_installed(u"npm"):
|
||||
|
|
Reference in a new issue