From e1b55b49e3dba48371369140a0a33d79fe304dea Mon Sep 17 00:00:00 2001 From: "James E. King III" Date: Wed, 26 Jan 2022 12:36:58 -0500 Subject: [PATCH] support BOOST_ROOT not in ~/boost properly --- README.md | 2 +- bin/linux/bdde | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 7fce8d5..daedf67 100644 --- a/README.md +++ b/README.md @@ -67,7 +67,7 @@ Add the `bin/linux` path to your environment (or do this in your .profile to mak Pull or build the linux docker image for the architecture you want, for exmaple: - user@ubuntu:~/bdde$ make linux-x86_64 + user@ubuntu:~/bdde$ make deb-x86_64 If you do not have the boost source tree locally, obtain it: diff --git a/bin/linux/bdde b/bin/linux/bdde index aecbf9b..59ab4ea 100755 --- a/bin/linux/bdde +++ b/bin/linux/bdde @@ -1,6 +1,6 @@ #!/usr/bin/env bash # -# Copyright (C) 2018 - 2019 James E. King III +# Copyright (C) 2018 - 2022 James E. King III # # Use, modification, and distribution are subject to the # Boost Software License, Version 1.0. (See accompanying file @@ -16,13 +16,13 @@ BDDE_LIB=${BDDE_ROOT}/bin/linux/lib set -e BOOST_ROOT=$(find_boost_root) -BOOST_STEM=${BOOST_STEM:-$(realpath --logical --relative-base="${BOOST_ROOT}/.." "$(pwd)")} +BOOST_STEM=${BOOST_STEM:-/boost/$(realpath --logical --relative-base="${BOOST_ROOT}" "$(pwd)")} set +e if [ $# -ne 0 ]; then set -x - docker run --rm --cap-add=SYS_PTRACE --security-opt seccomp=unconfined ${BDDE_DOCK} -v "${BOOST_ROOT}:/boost:rw" -v "${BDDE_ROOT}:/bdde:ro" -v "${HOME}/.vimrc:/home/boost/.vimrc:ro" --workdir "/${BOOST_STEM}" -it ${BDDE_REPO}:${BDDE_OS}-${BDDE_ARCH} ${BDDE_SHELL} -c "$*" + docker run --rm --cap-add=SYS_PTRACE --security-opt seccomp=unconfined ${BDDE_DOCK} -v "${BOOST_ROOT}:/boost:rw" -v "${BDDE_ROOT}:/bdde:ro" -v "${HOME}/.vimrc:/home/boost/.vimrc:ro" --workdir "${BOOST_STEM}" -it ${BDDE_REPO}:${BDDE_OS}-${BDDE_ARCH} ${BDDE_SHELL} -c "$*" else set -x - docker run --rm --cap-add=SYS_PTRACE --security-opt seccomp=unconfined ${BDDE_DOCK} -v "${BOOST_ROOT}:/boost:rw" -v "${BDDE_ROOT}:/bdde:ro" -v "${HOME}/.vimrc:/home/boost/.vimrc:ro" --workdir "/${BOOST_STEM}" -it ${BDDE_REPO}:${BDDE_OS}-${BDDE_ARCH} ${BDDE_SHELL} + docker run --rm --cap-add=SYS_PTRACE --security-opt seccomp=unconfined ${BDDE_DOCK} -v "${BOOST_ROOT}:/boost:rw" -v "${BDDE_ROOT}:/bdde:ro" -v "${HOME}/.vimrc:/home/boost/.vimrc:ro" --workdir "${BOOST_STEM}" -it ${BDDE_REPO}:${BDDE_OS}-${BDDE_ARCH} ${BDDE_SHELL} fi