]> www.infradead.org Git - users/sagi/nvme-cli.git/commitdiff
scripts: Execute the scripts from toplevel directory
authorDaniel Wagner <dwagner@suse.de>
Fri, 23 Jun 2023 07:05:53 +0000 (09:05 +0200)
committerDaniel Wagner <wagi@monom.org>
Wed, 28 Jun 2023 11:19:23 +0000 (13:19 +0200)
These scripts expect to be run from the toplevel directory, so make sure
we are running from there.

Signed-off-by: Daniel Wagner <dwagner@suse.de>
scripts/release.sh
scripts/update-docs.sh

index f95d6f7e698739cc84f9a293d0bf7feefc3aaef9..244e7fc56d60913380bc6f4ad5f107f8039092de 100755 (executable)
@@ -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"
index 87a73cc12b9bfbac90be65a30f4ae4daed5f6376..1f3f67718c3d532dcd0586c5ef3d445d3a089adf 100755 (executable)
@@ -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