From 241b3f50465ad96827716ca03c06b242897d8544 Mon Sep 17 00:00:00 2001 From: Daniel Wagner-Hall Date: Wed, 24 Jan 2024 18:40:16 +0000 Subject: [PATCH] Make build.sh work from arbitrary directories (#153) I keep trying to run it from inside website --- website/build.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/website/build.sh b/website/build.sh index 7e792046f..fbd578882 100755 --- a/website/build.sh +++ b/website/build.sh @@ -1,5 +1,10 @@ #!/bin/bash -eu +SCRIPT_DIR="$(cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd)" +REPO_ROOT="$(cd "${SCRIPT_DIR}" && cd .. && pwd)" + +cd "${REPO_ROOT}" + case "$(uname)" in Darwin) sed_i=("sed" "-i" "")