Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consider using relative paths for setup.sh #7

Open
nimne opened this issue Feb 9, 2022 · 1 comment
Open

Consider using relative paths for setup.sh #7

nimne opened this issue Feb 9, 2022 · 1 comment

Comments

@nimne
Copy link

nimne commented Feb 9, 2022

The current setup.sh assumes that miniconda3 is installed in the default location, which can lead to a failed installation. Please consider using the $CONDA_PREFIX environment variable. It is also a little risky running any rm -rf commands - perhaps just leaving the directory there? The initial PATH export should also be unnecessary, as the install requires activating the conda environment (i.e., it is already in the $PATH). It is also unclear why read/write/execute permissions are given system wide.

Current setup.sh:

#! /usr/bin/env bash

export PATH=~/miniconda3/bin:$PATH
cp -rf config-files ../miniconda3/envs/rMAP-1.0/
chmod 777 ../miniconda3/envs/rMAP-1.0/config-files/*
cp -rf bin/rMAP ../miniconda3/envs/rMAP-1.0/bin/
chmod 777 ../miniconda3/envs/rMAP-1.0/bin/rMAP

echo -e "rMAP is all set up!!! Run 'rMAP -h' to confirm."
touch ../clean.sh &
echo "#! /usr/bin/env bash" >../clean.sh
echo "rm -rf rMAP" >>../clean.sh
chmod 777 ../clean.sh
cd
bash clean.sh

Proposed change:

#! /usr/bin/env bash

cp -rf config-files $CONDA_PREFIX
cp -rf bin/rMAP $CONDA_PREFIX/bin/
chmod +x $CONDA_PREFIX/bin/rMAP

echo -e "rMAP is all set up!!! Run 'rMAP -h' to confirm."

If this is acceptable, I'm happy to make a PR!

@GunzIvan28
Copy link
Owner

@nimne ,
Thanks for the input. We are glad to incorporate the suggested changes. We are going to test the code and the update the repo accordingly.

Cheers,
Ivan

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants