aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTheodore Ts'o <tytso@mit.edu>2023-07-23 21:34:25 -0400
committerTheodore Ts'o <tytso@mit.edu>2023-07-23 21:34:25 -0400
commit69e335f8a814939f1681af164eb96681a23ac9ee (patch)
tree1c6172f917157cd0622e1faa0a023112977493b6
parentad48db386745ab768f989efe369a1d6a4552c2c9 (diff)
downloadxfstests-bld-69e335f8a814939f1681af164eb96681a23ac9ee.tar.gz
build-appliance: allow the script to be run from any directory
Remove the dependencies that assume that the build-appliance script must be run from the top-level of the xfstests-bld tree. Signed-off-by: Theodore Ts'o <tytso@mit.edu>
-rwxr-xr-xbuild-appliance8
1 files changed, 8 insertions, 0 deletions
diff --git a/build-appliance b/build-appliance
index c4e53e98..0e557626 100755
--- a/build-appliance
+++ b/build-appliance
@@ -13,6 +13,14 @@ BUILD_ENV=
SUDO_ENV=sudo
DO_GCE=
+d=$(dirname "$0")
+if test $d = "." ; then
+ DIR=$(pwd)
+else
+ DIR=$(realpath $(dirname "$0"))
+fi
+cd "$DIR"
+
if test -f config.custom ; then
. config.custom
else