1
0
Files
chezmoi/home/.chezmoiscripts/run_once_after_30-quarto-config.sh.tmpl
2025-08-14 13:35:44 +02:00

38 lines
948 B
Cheetah

#!{{ lookPath "bash" }}
# title
title="IDE's configuration"
# include lib
. ${CHEZMOI_WORKING_TREE}/scripts/utils.sh
{{- if (ne .hasIDE false) }}
log "Begin ${title}"
inf "install tinytex for Quarto"
if [[ $(command -v quarto) ]]; then
quarto install tinytex
fi
inf "install python dependencies for Quarto"
python3 -Im pip install jupyter jupyterlab ipykernel matplotlib plotly pandas
asdf reshim python
inf "install and register Jupyter kernels"
JUPYTER_BIN="$(asdf which jupyter)"
python3 -Im ipykernel install --user --name python-asdf --display-name "Python (asdf)"
Rscript -e "install.packages('IRkernel', repos='https://cloud.r-project.org')" \
-e "Sys.setenv(JUPYTER=\"$JUPYTER_BIN\"); IRkernel::installspec(user = TRUE)"
julia -e "ENV[\"JUPYTER\"]=\"${JUPYTER_BIN}\"; using Pkg; Pkg.add(\"IJulia\"); Pkg.build(\"IJulia\")"
log "${title} done"
{{- end }}