rMAP
rMAP copied to clipboard
Consider using relative paths for setup.sh
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!