Skip to content

Commit

Permalink
Manjaro Linux: export MAKEFLAGS from /etc/bash.bashrc
Browse files Browse the repository at this point in the history
  • Loading branch information
takano32 committed Jul 11, 2023
1 parent d629bee commit 1c90c08
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
1 change: 1 addition & 0 deletions manjarolinux/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ RUN mkdir /home/takano32
RUN chown -R takano32.takano32 /build-kernel /home/takano32
RUN echo "takano32 ALL=(ALL:ALL) NOPASSWD: ALL" > /etc/sudoers.d/takano32
ENV SUDO="sudo -u takano32"
RUN echo 'export MAKEFLAGS="-j 8"' >> /etc/bash.bashrc

COPY ./manjarolinux/entrypoint.sh /
RUN chmod 755 /entrypoint.sh
Expand Down
6 changes: 2 additions & 4 deletions manjarolinux/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ set -eux
BUILD_DIR=/build-kernel/build
SUDO="sudo -u takano32"

rm -rf $BUILD_DIR/* || :
mkdir -p $BUILD_DIR
chown -R takano32:takano32 $BUILD_DIR
cd $BUILD_DIR
Expand All @@ -17,10 +18,7 @@ $SUDO git config --global http.postBuffer 524288000
while :; do $SUDO makepkg -o --skippgpcheck && break || sleep 5; done

# `makepkg` in `$BUILD_DIR/linux`
JOBS=$(getconf _NPROCESSORS_ONLN)
JOBS=$(expr "$JOBS" + "$JOBS")
MAKEFLAGS="-j $JOBS"
$SUDO bash -c "MAKEFLAGS=""$MAKEFLAGS"" makepkg --skippgpcheck"
$SUDO makepkg --skippgpcheck

cd $BUILD_DIR
mv linux/src/archlinux-linux/Documentation/output ../htmldocs
Expand Down

0 comments on commit 1c90c08

Please sign in to comment.