summaryrefslogtreecommitdiff
path: root/packageinstall.sh
diff options
context:
space:
mode:
Diffstat (limited to 'packageinstall.sh')
-rwxr-xr-xpackageinstall.sh20
1 files changed, 20 insertions, 0 deletions
diff --git a/packageinstall.sh b/packageinstall.sh
new file mode 100755
index 0000000..d99af8d
--- /dev/null
+++ b/packageinstall.sh
@@ -0,0 +1,20 @@
+#!/usr/bin/bash
+while IFS=" " read -r pkg;
+do
+
+
+ [ -z ${pkg} ] && help
+
+ REXEC=$(which R)
+
+ if [ -z ${REXEC} ]; then
+ echo "R not found, please ensure R is available and try again."
+ exit 1
+ fi
+
+ echo "install.packages(\"${pkg}\", repos=\"https://cran.rstudio.com/\")" | R --no-save
+done < requirements.txt
+
+
+
+