From 2bea58ed38d95d3d253dbca4672768857bf7fe2c Mon Sep 17 00:00:00 2001 From: Phani Pavan K Date: Thu, 18 Sep 2025 07:37:17 +0530 Subject: [PATCH] change ls to find, pass mainfile name to latex --- .gitea/workflows/build.yaml | 18 +++++++++--------- README.md | 9 +++++---- setupFiles/compile.sh | 2 +- startup.sh | 4 ++-- 4 files changed, 17 insertions(+), 16 deletions(-) diff --git a/.gitea/workflows/build.yaml b/.gitea/workflows/build.yaml index 669583c..10d22c8 100644 --- a/.gitea/workflows/build.yaml +++ b/.gitea/workflows/build.yaml @@ -1,7 +1,7 @@ on: [push, pull_request] jobs: - QC: + CD: name: Build Container runs-on: ubuntu-latest steps: @@ -9,13 +9,13 @@ jobs: - uses: docker/setup-buildx-action@v3 - uses: docker/login-action@v3 with: - username: ${{ vars.DOCKERHUB_USERNAME }} - password: ${{ secrets.DOCKERHUB_RW_PAT }} + username: ${{ vars.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_RW_PAT }} - uses: docker/build-push-action@v6 with: - context: . - push: true - tags: phanipavank/autoltx:latest - platforms: linux/arm64, linux/amd64 - build-args: | - TARGETARCH=${{matrix.arch}} \ No newline at end of file + context: . + push: true + tags: phanipavank/autoltx:latest + platforms: linux/arm64, linux/amd64 + build-args: | + TARGETARCH=${{matrix.arch}} diff --git a/README.md b/README.md index ce61f2f..e0dfb7c 100644 --- a/README.md +++ b/README.md @@ -34,7 +34,8 @@ replace `` with the primary tex file to compile, ``, called `output.pdf`. Keep it open so any changes to the main tex file, triggers a pdf update. Other files include `compile.sh`: the main compilation script, `latexmkrc`: used by the `latexmk` compiler, edit cautiously, and `.autoltx`: used for versioning the container scripts. -- These files are added to gitignore if present to avoid tracking unnecessary files by git. +- Compilation starts as soon as you start the container, and if the required files are present in the project folder. +- The container will create a new folder `pdf` to store all the build files. +- You can follow the compilation logs in the terminal for any errors or warnings. +- Once the project compiles, the resulting PDF ends up in the ``, called `output.pdf`. Keep it open so any changes to the main tex file triggers a refresh by your PDF viewer. Other files include `compile.sh`: the main compilation script, `latexmkrc`: used by the `latexmk` compiler, edit cautiously, and `.autoltx`: used for versioning the container scripts. +- These files are added to gitignore to avoid tracking by git. diff --git a/setupFiles/compile.sh b/setupFiles/compile.sh index 2f8873b..544d56a 100644 --- a/setupFiles/compile.sh +++ b/setupFiles/compile.sh @@ -8,7 +8,7 @@ mkdir -p pdf # rm pdf/* # fi # latexmk -C -latexmk -pdf -jobname=pdf/output main.tex -f -quiet +latexmk -pdf -jobname=pdf/output $1 -f -quiet # count=`ls -1 *.aux 2>/dev/null | wc -l` # if [ $count != 0 ] # then diff --git a/startup.sh b/startup.sh index c64c8ec..469eab8 100644 --- a/startup.sh +++ b/startup.sh @@ -1,6 +1,6 @@ #! /bin/bash -echo Running as user: "$USER" +echo Running as user: $USER if [[ -z ${1} ]]; then echo Main file not spicified @@ -26,4 +26,4 @@ fi echo Starting AutoLTX... sleep 3 cd /app/project || exit 2 -ls "$1" | entr -n sh -c ./compile.sh +find ./* -name "*.tex" | entr -n sh -c "./compile.sh $1"