Repository navigation
docs: agregar conclusiones y soporte de compilación en macOS #49
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,2 +1,15 @@ | ||
| # Artefactos de LaTeX: el PDF se regenera con `latexmk`. | ||
| build/ | ||
|
|
||
| # Artefactos generados cuando LaTeX compila directamente en esta carpeta. | ||
| /*.aux | ||
| /*.bbl | ||
| /*.bcf | ||
| /*.blg | ||
| /*.fdb_latexmk | ||
| /*.fls | ||
| /*.log | ||
| /*.run.xml | ||
| /*.synctex.gz | ||
| /*.toc |
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -2,6 +2,7 @@ | |||||||||||||||||||
| # Compila el informe de la PC2: regenera lo generado y corre latexmk. | ||||||||||||||||||||
| # | ||||||||||||||||||||
| # ./compilar.sh # build/main.pdf | ||||||||||||||||||||
| # ./compilar.sh --open # compila y abre el PDF | ||||||||||||||||||||
| # ./compilar.sh -c # limpia (latexmk -c) | ||||||||||||||||||||
| # | ||||||||||||||||||||
| # En Fedora, latexmk y biber de TeX Live necesitan perl-sigtrap y libxcrypt-compat. | ||||||||||||||||||||
|
|
@@ -10,28 +11,70 @@ | |||||||||||||||||||
| set -euo pipefail | ||||||||||||||||||||
| cd "$(dirname "$0")" | ||||||||||||||||||||
|
|
||||||||||||||||||||
| deps=build/deps | ||||||||||||||||||||
| export LD_LIBRARY_PATH="$PWD/$deps/usr/lib64${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}" | ||||||||||||||||||||
| export PERL5LIB="$PWD/$deps/usr/share/perl5${PERL5LIB:+:$PERL5LIB}" | ||||||||||||||||||||
| abrir=false | ||||||||||||||||||||
| case "${1:-}" in | ||||||||||||||||||||
| "") ;; | ||||||||||||||||||||
| -c|--clean) | ||||||||||||||||||||
| latexmk -c | ||||||||||||||||||||
| exit 0 | ||||||||||||||||||||
| ;; | ||||||||||||||||||||
| -o|--open) abrir=true ;; | ||||||||||||||||||||
| *) | ||||||||||||||||||||
| echo "uso: $0 [-c|--clean|-o|--open]" >&2 | ||||||||||||||||||||
| exit 2 | ||||||||||||||||||||
| ;; | ||||||||||||||||||||
| esac | ||||||||||||||||||||
|
|
||||||||||||||||||||
| falta_sigtrap() { ! perl -e 'use sigtrap' 2>/dev/null; } | ||||||||||||||||||||
| falta_libcrypt() { ! ldconfig -p | grep -q 'libcrypt\.so\.1 ' && [ ! -e "$deps/usr/lib64/libcrypt.so.1" ]; } | ||||||||||||||||||||
| # Estas dependencias adicionales solo son necesarias en Fedora. En macOS se usa | ||||||||||||||||||||
| # directamente la instalación local de MacTeX/TeX Live. | ||||||||||||||||||||
| if [ "$(uname -s)" = "Linux" ]; then | ||||||||||||||||||||
| deps=build/deps | ||||||||||||||||||||
| export LD_LIBRARY_PATH="$PWD/$deps/usr/lib64${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}" | ||||||||||||||||||||
| export PERL5LIB="$PWD/$deps/usr/share/perl5${PERL5LIB:+:$PERL5LIB}" | ||||||||||||||||||||
|
|
||||||||||||||||||||
| if falta_sigtrap || falta_libcrypt; then | ||||||||||||||||||||
| if [ ! -d "$deps/usr" ]; then | ||||||||||||||||||||
| echo "→ faltan perl-sigtrap o libxcrypt-compat; se extraen en $deps (sin root)" >&2 | ||||||||||||||||||||
| mkdir -p "$deps" | ||||||||||||||||||||
| ( cd "$deps" && dnf download -q perl-sigtrap libxcrypt-compat \ | ||||||||||||||||||||
| && rm -f *.i686.rpm && for r in *.rpm; do rpm2cpio "$r" | cpio -idm --quiet; done && rm -f *.rpm ) | ||||||||||||||||||||
| falta_sigtrap() { ! perl -e 'use sigtrap' 2>/dev/null; } | ||||||||||||||||||||
| falta_libcrypt() { | ||||||||||||||||||||
| ! command -v ldconfig >/dev/null 2>&1 || | ||||||||||||||||||||
| { ! ldconfig -p | grep -q 'libcrypt\.so\.1 ' && [ ! -e "$deps/usr/lib64/libcrypt.so.1" ]; } | ||||||||||||||||||||
| } | ||||||||||||||||||||
|
|
||||||||||||||||||||
| if falta_sigtrap || falta_libcrypt; then | ||||||||||||||||||||
| if [ ! -d "$deps/usr" ]; then | ||||||||||||||||||||
| if ! command -v dnf >/dev/null 2>&1; then | ||||||||||||||||||||
| echo "error: faltan dependencias de TeX Live y no está disponible dnf" >&2 | ||||||||||||||||||||
| exit 1 | ||||||||||||||||||||
| fi | ||||||||||||||||||||
| echo "→ faltan perl-sigtrap o libxcrypt-compat; se extraen en $deps (sin root)" >&2 | ||||||||||||||||||||
| mkdir -p "$deps" | ||||||||||||||||||||
| ( cd "$deps" && dnf download -q perl-sigtrap libxcrypt-compat \ | ||||||||||||||||||||
| && rm -f -- *.i686.rpm && for r in *.rpm; do rpm2cpio "$r" | cpio -idm --quiet; done && rm -f -- *.rpm ) | ||||||||||||||||||||
| fi | ||||||||||||||||||||
| fi | ||||||||||||||||||||
| fi | ||||||||||||||||||||
|
|
||||||||||||||||||||
| if [ "${1:-}" = "-c" ]; then | ||||||||||||||||||||
| latexmk -c | ||||||||||||||||||||
| exit 0 | ||||||||||||||||||||
| fi | ||||||||||||||||||||
| command -v latexmk >/dev/null 2>&1 || { | ||||||||||||||||||||
| echo "error: no se encontró latexmk; instala MacTeX o BasicTeX" >&2 | ||||||||||||||||||||
| exit 1 | ||||||||||||||||||||
| } | ||||||||||||||||||||
|
|
||||||||||||||||||||
| ./generar-historial.sh | ||||||||||||||||||||
| if ! ./generar-historial.sh; then | ||||||||||||||||||||
| if [ -s generado/historial.tex ]; then | ||||||||||||||||||||
| echo "aviso: no se pudo actualizar el historial; se conserva generado/historial.tex" >&2 | ||||||||||||||||||||
| else | ||||||||||||||||||||
| echo "error: no existe un historial anterior para continuar" >&2 | ||||||||||||||||||||
| exit 1 | ||||||||||||||||||||
| fi | ||||||||||||||||||||
| fi | ||||||||||||||||||||
|
Comment on lines
+60
to
+67
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. issue (bug_risk): Cualquier fallo de Triggers: Cuando el historial no puede regenerarse por un tag faltante, una configuración Git inválida, permisos o refs remotas desactualizadas, y ya existe un archivo generado previamente. Suggested fix: Limitar el fallback a errores explícitamente recuperables, como una falla de red con refs válidas, y hacer fallar la compilación ante errores de validación o generación.
Suggested change
|
||||||||||||||||||||
| python3 ../../scripts/tablas_informe.py --salida generado | ||||||||||||||||||||
| latexmk | ||||||||||||||||||||
| echo "→ build/main.pdf" | ||||||||||||||||||||
|
|
||||||||||||||||||||
| if $abrir; then | ||||||||||||||||||||
| if [ "$(uname -s)" = "Darwin" ]; then | ||||||||||||||||||||
| open build/main.pdf | ||||||||||||||||||||
| elif command -v xdg-open >/dev/null 2>&1; then | ||||||||||||||||||||
| xdg-open build/main.pdf | ||||||||||||||||||||
| else | ||||||||||||||||||||
| echo "aviso: abre manualmente $PWD/build/main.pdf" >&2 | ||||||||||||||||||||
| fi | ||||||||||||||||||||
| fi | ||||||||||||||||||||
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
issue (broader_impact): La opción
-c/--cleanejecutalatexmk -cantes de configurarLD_LIBRARY_PATHyPERL5LIBo descargar las dependencias Fedora, por lo que la limpieza falla en Fedora cuandolatexmknecesitaperl-sigtrapolibxcrypt-compatinstalados solamente enbuild/deps.Triggers: Cuando se ejecuta
./compilar.sh -cen Fedora con las dependencias locales debuild/deps.Suggested fix: Procesar la configuración de dependencias y verificar
latexmkantes de ejecutar la rama de limpieza, o aplicar esas variables de entorno también alatexmk -c.