Skip to content

Commit

Permalink
fix: patch root's .bashrc file to include completion
Browse files Browse the repository at this point in the history
  • Loading branch information
rjaegers committed Sep 28, 2024
1 parent c792a40 commit 964294f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion .devcontainer/cpp/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -95,10 +95,12 @@ RUN --mount=type=cache,target=/root/.ccache,sharing=locked \
&& rm -rf /var/lib/apt/lists/*

# Update all tool alternatives to the correct version
# and patch root's bashrc to include bash-completion
RUN update-alternatives --install /usr/bin/c++ c++ /usr/bin/g++-13 20 \
&& update-alternatives --install /usr/bin/cc cc /usr/bin/gcc-13 20 \
&& update-alternatives --install /usr/bin/gcov gcov /usr/bin/gcov-13 10 \
&& update-alternatives --install /usr/bin/iwyu iwyu /usr/local/bin/include-what-you-use 10 \
&& update-alternatives --install /usr/bin/mull-runner mull-runner /usr/local/bin/mull-runner-${CLANG_VERSION} 10 \
&& update-alternatives --install /usr/lib/mull-ir-frontend mull-ir-frontend /usr/local/lib/mull-ir-frontend-${CLANG_VERSION} 10 \
&& update-alternatives --install /usr/bin/python python /usr/bin/python3 10
&& update-alternatives --install /usr/bin/python python /usr/bin/python3 10 \
&& cp /etc/skel/.bashrc /root/.bashrc
4 changes: 3 additions & 1 deletion .devcontainer/rust/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,9 @@ RUN batstmp="$(mktemp -d /tmp/bats-core-${BATS_VERSION}.XXXX)" \
&& git -C /usr/local clone -b v2.1.0 https://github.com/bats-core/bats-assert.git

# Update all tool alternatives to the correct version
RUN update-alternatives --install /usr/bin/cc cc /usr/bin/gcc-13 20
# and patch root's bashrc to include bash-completion
RUN update-alternatives --install /usr/bin/cc cc /usr/bin/gcc-13 20 \
&& cp /etc/skel/.bashrc /root/.bashrc

# Install additional rust tools
RUN wget -qO - "https://github.com/cargo-bins/cargo-binstall/releases/download/v${CARGO_BINSTALL_VERSION}/cargo-binstall-$(uname -m)-unknown-linux-gnu.tgz" | tar xz -C "/usr/bin" \
Expand Down

0 comments on commit 964294f

Please sign in to comment.