Restructure R library loading
This commit is contained in:
@@ -439,14 +439,18 @@ install_dependencies() {
|
|||||||
|
|
||||||
# Install system-wide dependencies
|
# Install system-wide dependencies
|
||||||
echo "Installing system dependencies"
|
echo "Installing system dependencies"
|
||||||
|
echo "You may be prompted for your sudo password to install packages using your system package manager"
|
||||||
case "$(uname -s)" in
|
case "$(uname -s)" in
|
||||||
Linux*|CYGWIN*|MINGW*)
|
Linux*|CYGWIN*|MINGW*)
|
||||||
ask "Detected Linux platform, continue?" || return 1
|
|
||||||
echo "You may be prompted for your sudo password to install system packages"
|
|
||||||
if hash dnf &>/dev/null; then
|
if hash dnf &>/dev/null; then
|
||||||
|
ask "Detected Linux RPM platform, continue?" || return 1
|
||||||
sudo dnf install "${depends_rpm[@]}"
|
sudo dnf install "${depends_rpm[@]}"
|
||||||
elif hash apt &>/dev/null; then
|
elif hash apt &>/dev/null; then
|
||||||
|
ask "Detected Linux DEB platform, continue?" || return 1
|
||||||
sudo apt install "${depends_deb[@]}"
|
sudo apt install "${depends_deb[@]}"
|
||||||
|
else
|
||||||
|
echo "Sorry, your Linux platform is not supported for automatic dependency installation"
|
||||||
|
echo "You will need to resolve dependencies manually"
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
Darwin*)
|
Darwin*)
|
||||||
@@ -478,10 +482,9 @@ install_dependencies() {
|
|||||||
}
|
}
|
||||||
depends_r_to_string
|
depends_r_to_string
|
||||||
|
|
||||||
|
|
||||||
# Install R packages
|
# Install R packages
|
||||||
for d in "${depends_r[@]}"; do
|
for d in "${depends_r[@]}"; do
|
||||||
debug "$RSCRIPT -e \"if (!require(\"$d\", quietly = TRUE)); install.packages(\"$d\", dep=TRUE, repos=\"https://cloud.r-project.org\")\""
|
debug "$RSCRIPT -e \"if (!require(\"$d\", quietly = TRUE)); {install.packages(\"$d\", dep=TRUE, repos=\"https://cloud.r-project.org\")}\""
|
||||||
"$RSCRIPT" -e "if (!require(\"$d\", quietly = TRUE)); {install.packages(\"$d\", dep=TRUE, repos=\"https://cloud.r-project.org\")}"
|
"$RSCRIPT" -e "if (!require(\"$d\", quietly = TRUE)); {install.packages(\"$d\", dep=TRUE, repos=\"https://cloud.r-project.org\")}"
|
||||||
done
|
done
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user