summaryrefslogtreecommitdiffstats
path: root/src/test/detect-build-env-vars.sh
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-27 18:24:20 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-27 18:24:20 +0000
commit483eb2f56657e8e7f419ab1a4fab8dce9ade8609 (patch)
treee5d88d25d870d5dedacb6bbdbe2a966086a0a5cf /src/test/detect-build-env-vars.sh
parentInitial commit. (diff)
downloadceph-483eb2f56657e8e7f419ab1a4fab8dce9ade8609.tar.xz
ceph-483eb2f56657e8e7f419ab1a4fab8dce9ade8609.zip
Adding upstream version 14.2.21.upstream/14.2.21upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/test/detect-build-env-vars.sh')
-rw-r--r--src/test/detect-build-env-vars.sh19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/test/detect-build-env-vars.sh b/src/test/detect-build-env-vars.sh
new file mode 100644
index 00000000..9118de5f
--- /dev/null
+++ b/src/test/detect-build-env-vars.sh
@@ -0,0 +1,19 @@
+#!/usr/bin/env bash
+
+if [ -n "$CEPH_BUILD_DIR" ] && [ -n "$CEPH_ROOT" ] && [ -n "$CEPH_BIN" ] && [ -n "$CEPH_LIB" ]; then
+ echo "Enivronment Variables Already Set"
+elif [ -e CMakeCache.txt ]; then
+ echo "Environment Variables Not All Set, Detected Build System CMake"
+ echo "Setting Environment Variables"
+ export CEPH_ROOT=`grep ceph_SOURCE_DIR CMakeCache.txt | cut -d "=" -f 2`
+ export CEPH_BUILD_DIR=`pwd`
+ export CEPH_BIN=$CEPH_BUILD_DIR/bin
+ export CEPH_LIB=$CEPH_BUILD_DIR/lib
+ export PATH=$CEPH_BIN:$PATH
+ export LD_LIBRARY_PATH=$CEPH_LIB
+else
+ echo "Please execute this command out of the proper directory"
+ exit 1
+fi
+
+