# ${R_HOME}/bin/Sweave -*- sh -*-

R_EXE="${R_HOME}/bin/R"

R_SWEAVE_OPTIONS=${R_SWEAVE_OPTIONS:='--no-restore --no-echo'}

args=
while test -n "${1}"; do
  ## quote each argument here, unquote in R code.
  args="${args}nextArg${1}"
  shift
done

echo "utils:::.Sweave()" | "${R_EXE}" $R_SWEAVE_OPTIONS --args ${args}
