From: Daniel Wagner Date: Fri, 23 Jun 2023 07:05:53 +0000 (+0200) Subject: scripts: Execute the scripts from toplevel directory X-Git-Tag: v2.5~11 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=976d79cbc9fe00646ebe2a6b790474f11920ae65;p=users%2Fsagi%2Fnvme-cli.git 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 --- 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