From 82002250960cb445c0f88c33a62df3817f2540c1 Mon Sep 17 00:00:00 2001 From: Benedikt Peetz Date: Thu, 3 Oct 2024 16:06:25 +0200 Subject: fix(common/scripts/latex/build.sh): Don't depend on the current PWD --- common/scripts/latex/build.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/common/scripts/latex/build.sh b/common/scripts/latex/build.sh index c67ad52..616a09d 100755 --- a/common/scripts/latex/build.sh +++ b/common/scripts/latex/build.sh @@ -1,6 +1,8 @@ #!/usr/bin/env sh -file="./%INIT_APPLICATION_NAME.tex" +root="$(git rev-parse --show-toplevel)" + +file="$root/%INIT_APPLICATION_NAME.tex" dst=build clear=false @@ -21,7 +23,7 @@ for arg in "$@"; do done # find all directories which are not the destination dir or inside it -find . -type d -not -name "$dst" -not -path "./$dst/*" -printf '%P\n' | while IFS= read -r dir; do +find "$root" -type d -not -name "$dst" -not -path "./$dst/*" -printf '%P\n' | while IFS= read -r dir; do mkdir --parents "$dst/$dir" done -- cgit 1.4.1