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

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

R_STANGLE_OPTIONS=${R_STANGLE_OPTIONS:='--vanilla --slave'}

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

echo "utils:::.Stangle()" | "${R_EXE}" $R_STANGLE_OPTIONS --args ${args}
