From 976d79cbc9fe00646ebe2a6b790474f11920ae65 Mon Sep 17 00:00:00 2001 From: Daniel Wagner Date: Fri, 23 Jun 2023 09:05:53 +0200 Subject: [PATCH] scripts: Execute the scripts from toplevel directory These scripts expect to be run from the toplevel directory, so make sure we are running from there. Signed-off-by: Daniel Wagner --- scripts/release.sh | 4 +++- scripts/update-docs.sh | 2 ++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/scripts/release.sh b/scripts/release.sh index f95d6f7e..244e7fc5 100755 --- a/scripts/release.sh +++ b/scripts/release.sh @@ -55,6 +55,8 @@ else exit 1 fi +cd "$(git rev-parse --show-toplevel)" || exit 1 + git -C subprojects/libnvme fetch --all # extract the vesion string from libnvme by using the ref @@ -104,7 +106,7 @@ fi if [ "$build_doc" = true ]; then # update documentation - ./$doc_dir/update-docs.sh + ./scripts/update-docs.sh if [[ "${dry_run}" = false ]]; then git add $doc_dir git commit -s -m "doc: Regenerate all docs for $VERSION" diff --git a/scripts/update-docs.sh b/scripts/update-docs.sh index 87a73cc1..1f3f6771 100755 --- a/scripts/update-docs.sh +++ b/scripts/update-docs.sh @@ -1,6 +1,8 @@ #!/bin/sh # SPDX-License-Identifier: GPL-2.0-or-later +cd "$(git rev-parse --show-toplevel)" || exit 1 + BUILDDIR="$(mktemp -d)" trap 'rm -rf -- $BUILDDIR' EXIT -- 2.49.0