Skip to content

Commit

Permalink
support BOOST_ROOT not in ~/boost properly
Browse files Browse the repository at this point in the history
  • Loading branch information
jeking3 committed Jan 26, 2022
1 parent 3de9996 commit e1b55b4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:

Expand Down
8 changes: 4 additions & 4 deletions bin/linux/bdde
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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

0 comments on commit e1b55b4

Please sign in to comment.