Fix R lib install
This commit is contained in:
@@ -300,6 +300,20 @@ interactive_header() {
|
|||||||
echo "Example: SCANS_DIR=/path/to/scans OUT_DIR=/path/to/out ./qhtcp-workflow $*"
|
echo "Example: SCANS_DIR=/path/to/scans OUT_DIR=/path/to/out ./qhtcp-workflow $*"
|
||||||
echo ""
|
echo ""
|
||||||
|
|
||||||
|
|
||||||
|
# Ask to make our custom R library the default
|
||||||
|
if [[ -z $R_LIBS_USER || $R_LIBS_USER != "$HOME/R/$SCRIPT_NAME" ]]; then
|
||||||
|
echo "This script uses a local R library at $HOME/R/$SCRIPT_NAME"
|
||||||
|
echo "You can install the R dependencies to this library using the install_dependencies module"
|
||||||
|
if ((YES)) || ask "Would you like to make this library the default for your user?"; then
|
||||||
|
echo "Adding R_LIBS_USER=$HOME/R/$SCRIPT_NAME to your .bashrc"
|
||||||
|
echo "export R_LIBS_USER=$HOME/R/$SCRIPT_NAME" >> "$HOME/.bashrc"
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
debug "R_LIBS_USER already set to $HOME/R/$SCRIPT_NAME"
|
||||||
|
fi
|
||||||
|
echo ""
|
||||||
|
|
||||||
echo "Available Modules:"
|
echo "Available Modules:"
|
||||||
for i in "${!ALL_MODULES[@]}"; do
|
for i in "${!ALL_MODULES[@]}"; do
|
||||||
printf "%d. %s\n" "$((i+1))" "${ALL_MODULES[i]}"
|
printf "%d. %s\n" "$((i+1))" "${ALL_MODULES[i]}"
|
||||||
@@ -1702,19 +1716,6 @@ main() {
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Ask to make our custom R library the default
|
|
||||||
if [[ -z $R_LIBS_USER || $R_LIBS_USER != "$HOME/R/$SCRIPT_NAME" ]]; then
|
|
||||||
echo "This script uses a custom R library at $HOME/R/$SCRIPT_NAME"
|
|
||||||
echo "You can install the R dependencies to this library using the install_dependencies module"
|
|
||||||
if ((YES)) || ask "Would you like to make this library the default for your user?"; then
|
|
||||||
echo "Adding R_LIBS_USER=$HOME/R/$SCRIPT_NAME to your .bashrc"
|
|
||||||
echo "export R_LIBS_USER=$HOME/R/$SCRIPT_NAME" >> "$HOME/.bashrc"
|
|
||||||
fi
|
|
||||||
else
|
|
||||||
debug "R_LIBS_USER already set to $HOME/R/$SCRIPT_NAME"
|
|
||||||
fi
|
|
||||||
|
|
||||||
|
|
||||||
# Make sure we are using the absolute path
|
# Make sure we are using the absolute path
|
||||||
OUT_DIR=$(realpath -s "$OUT_DIR")
|
OUT_DIR=$(realpath -s "$OUT_DIR")
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user