diff options
author | Benedikt Peetz <benedikt.peetz@b-peetz.de> | 2024-10-03 16:06:25 +0200 |
---|---|---|
committer | Benedikt Peetz <benedikt.peetz@b-peetz.de> | 2024-10-03 16:06:25 +0200 |
commit | 82002250960cb445c0f88c33a62df3817f2540c1 (patch) | |
tree | 512ba6d7ebffe754edc5e975f64c5ad7c820fc6f /common/scripts/latex/build.sh | |
parent | fix(template/latex/academia): Default to `report` document class (diff) | |
download | flake-templates-82002250960cb445c0f88c33a62df3817f2540c1.tar.gz flake-templates-82002250960cb445c0f88c33a62df3817f2540c1.zip |
fix(common/scripts/latex/build.sh): Don't depend on the current PWD
Diffstat (limited to 'common/scripts/latex/build.sh')
-rwxr-xr-x | common/scripts/latex/build.sh | 6 |
1 files 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 |