blob: d99af8d157ae30e23c80845c57d72bb25075efdf (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
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
|