From ccc13addd24a880210867fa1ba4f8cf93938b03a Mon Sep 17 00:00:00 2001 From: Incardona Pietro <incardon@mpi-cbg.de> Date: Mon, 15 Feb 2021 10:51:40 +0100 Subject: [PATCH] Adding openfpm_vars relocation --- install | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/install b/install index f4cc7bd97..a37123ad4 100755 --- a/install +++ b/install @@ -76,6 +76,9 @@ while getopts di:smghc:nul FLAG; do echo "No linear algebra" no_lin=1 ;; + v) + echo "Relocating openfpm_vars file $OPTARG" + VARS_FILE_LOCATION=$OPTARG h) #show help HELP ;; @@ -564,12 +567,16 @@ bash_library="$bash_library\"" # in cygwin we have to add to PATH additional directories -echo "$bash_path" > $HOME/openfpm_vars -echo "$bash_library" >> $HOME/openfpm_vars -echo "export PURE_PYTHON=1" >> $HOME/openfpm_vars +if [ x"VARS_FILE_LOCATION" == x"" ]; then + VARS_FILE_LOCATION=$HOME +fi + +echo "$bash_path" > $VARS_FILE_LOCATION/openfpm_vars +echo "$bash_library" >> $VARS_FILE_LOCATION/openfpm_vars +echo "export PURE_PYTHON=1" >> $VARS_FILE_LOCATION/openfpm_vars if [ x"$platform" = x"osx" ]; then - echo "TMPDIR=/tmp/" >> $HOME/openfpm_vars + echo "TMPDIR=/tmp/" >> $VARS_FILE_LOCATION/openfpm_vars fi echo -e "$installation_report" @@ -588,12 +595,12 @@ fi echo "" if [ x"$platform" = x"linux" ]; then - echo "Before run any openfpm program you must execute the following command. A simple way would be to append this line at the end of your $HOME/.bashrc" + echo "Before run any openfpm program you must execute the following command. A simple way would be to append this line at the end of your $VARS_FILE_LOCATION/.bashrc" else - echo "Before run any openfpm program you must execute the following command. A simple way would be to append this line at the end of your $HOME/.bash_profile" + echo "Before run any openfpm program you must execute the following command. A simple way would be to append this line at the end of your $VARS_FILE_LOCATION/.bash_profile" fi echo "" -echo -e "\033[1m source $HOME/openfpm_vars \033[0m" +echo -e "\033[1m source $VARS_FILE_LOCATION/openfpm_vars \033[0m" echo "" echo "" echo -e "Remember to do: \033[91;5;1m make install \033[0m" -- GitLab