aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xcommon/scripts/latex/build.sh6
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