Skip to content

Commit

Permalink
Confirm option for non-interactive install (ref #43)
Browse files Browse the repository at this point in the history
  • Loading branch information
j-woz committed May 15, 2018
1 parent b014bdc commit c91bf80
Showing 1 changed file with 19 additions and 3 deletions.
22 changes: 19 additions & 3 deletions workflows/common/R/install-candle.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,32 @@ set -eu

# Installs all R packages needed for Supervisor workflows

CONFIRM=1
while getopts ":y" OPTION
do
case $OPTION in
y) CONFIRM=0
;;
*) # The shell error message was disabled above
echo "install-candle.sh: unknown option: $*"
exit 1
;;
esac
done

echo "This will install multiple R packages for CANDLE."
echo
echo "using R: $( which R )"
echo "using gcc: $( which gcc )"
echo "using gfortran: $( which gfortran )"
echo
sleep 1
echo "Press enter to confirm, or Ctrl-C to cancel."

read _
if [ $CONFIRM = 1 ]
then
sleep 1
echo "Press enter to confirm, or Ctrl-C to cancel."
read _
fi

THIS=$( dirname $0 )
nice R -f $THIS/install-candle.R

0 comments on commit c91bf80

Please sign in to comment.