From a1849b43121fe5ffdba648100e4bfbf8de1d3cf6 Mon Sep 17 00:00:00 2001 From: Janis Hutz Date: Wed, 5 Aug 2026 10:50:54 +0200 Subject: [PATCH] [CORE] chore: prepare for new helpers import scheme --- .gitignore | 3 +++ .gitmodules | 3 +++ latex-helpers | 1 + setup.sh | 41 +++++++++++++++++++++++++++++++++++++++++ 4 files changed, 48 insertions(+) create mode 100644 .gitmodules create mode 160000 latex-helpers create mode 100755 setup.sh diff --git a/.gitignore b/.gitignore index e273b6d..0378e65 100644 --- a/.gitignore +++ b/.gitignore @@ -327,3 +327,6 @@ TSWLatexianTemp* # option is specified. Footnotes are the stored in a file with suffix Notes.bib. # Uncomment the next line to have this generated file ignored. #*Notes.bib + +# LaTeX Helpers utilities +helpers*.tex diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..d9b5f60 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "latex-helpers"] + path = latex-helpers + url = https://git.janishutz.com/janishutz/latex diff --git a/latex-helpers b/latex-helpers new file mode 160000 index 0000000..c1cec58 --- /dev/null +++ b/latex-helpers @@ -0,0 +1 @@ +Subproject commit c1cec5894c0141ac792d1d91c5e5e6755ffd232d diff --git a/setup.sh b/setup.sh new file mode 100755 index 0000000..8765ca6 --- /dev/null +++ b/setup.sh @@ -0,0 +1,41 @@ +#!/bin/sh + +set -e + +createFiles() { + echo "% Warning: This is an auto-generated file. To regenerate it, use the setup script. +% This file is used as import for generating the summaries +\\input{$1/janishutz-helpers.tex}" >./helpers.tex + + echo "% Warning: This is an auto-generated file. To regenerate it, use the setup script. +% This file is used as import for generating the older summaries +\\input{$1/old/janishutz-helpers-v1.tex}" >./helpers-old.tex +} + +echo " +▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄ +██░▄▄▄█▄▄░▄▄██░██░█████░▄▄▄░█░██░█░▄▀▄░█░▄▀▄░█░▄▄▀█░▄▄▀██▄██░▄▄█░▄▄ +██░▄▄▄███░████░▄▄░█▄▄██▄▄▄▀▀█░██░█░█▄█░█░█▄█░█░▀▀░█░▀▀▄██░▄█░▄▄█▄▄▀ +██░▀▀▀███░████░██░█████░▀▀▀░██▄▄▄█▄███▄█▄███▄█▄██▄█▄█▄▄█▄▄▄█▄▄▄█▄▄▄ +▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀ + + -> Basic Setup <- + ----------------------- + + => This script will link the LaTeX helpers to the build import +" + +read -p "Do you want to use the provided git submodule for the compilation? (Y/n) " usesubmodule + +if [[ $usesubmodule != 'n' ]]; then + if git submodule status | grep --quiet '^-'; then + echo "Submodule not yet initialized, initializing..." + else + echo "Submodule already set up" + fi + createFiles $(pwd)/latex-helpers +else + read -e -p "Where are the helper files located (absolute path to folder only, tab-completion enabled)? " helperpath + createFiles $helperpath + echo "Helpers set up. You may experience issues if you have not entered an absolute path. If so, simply rerun this script to regenerate the files!" +fi