[
https://issues.apache.org/jira/browse/CLIMATE-561?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14995858#comment-14995858
]
Vinicius Eduardo Soares da Silva commented on CLIMATE-561:
----------------------------------------------------------
Hi there,
I'm still getting acquainted with the project, but here are my 2 cents.
About the following:
"...if the ocw is installed in some other directory (other than the directory
entered by the user) the script cannot detect it and installs the dependencies
in the directory."
The two simplest solutions are:
1. Ignore previous installations and versions
In this case we could assume the user just want to use the new directory
(entered by the user) and ignore previous versions that could be installed
somewhere else on the filesystem.
2. Search the filesystem for previous installations and versions and use them
based on the user's response.
In this case, we could search the path from where the script is being run and
look for specific installation directories, also search different places within
the filesystem either using the find command (which could take a little longer
than desired) or using commands such as 'which' (present on most Linux distros.
I don't have access to an OSX system at the moment).
Running 'which python' and 'which conda' on my vm returns
'/home/vagrant/anaconda/bin/python/' and '/home/vagrant/anaconda/bin/conda'.
Maybe you could use this output to indicate to the user that a previous
installation was detected. After that, ask if the user wants to use the
existing files or provide a different path.
On a side note, my suggestion is based in the fact that I'm not sure which
directories and files should be search though. I did hack the installation
script to search and find previous versions of Anaconda and basemap in order to
avoid having to download the very same content every time I ran the
installation script.
> easy-ocw/install-osx.sh script should not assume relative locations for
> dependency utilitiy files
> -------------------------------------------------------------------------------------------------
>
> Key: CLIMATE-561
> URL: https://issues.apache.org/jira/browse/CLIMATE-561
> Project: Apache Open Climate Workbench
> Issue Type: Bug
> Components: easy-ocw
> Affects Versions: 0.4, 0.5
> Reporter: Lewis John McGibbney
> Assignee: Lewis John McGibbney
> Labels: build
> Fix For: 1.2
>
>
> Right now there are a number of flat files contained within ./easy-ocw/ which
> are utilized (very cunningly) to make the easy install process smooth.
> An improvement to the install scripts themselves would be to NOT assume these
> files are relative to where the script was invoked.
> We should be able to find these files based on a $OCW_HOME or something.
> Right now (as we are already setting virtualenv etc) I am not entirely sure
> how we do this cleanly.
> Lets talk about it.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)