Skip to content

Commit

Permalink
beesh.sh: use pbzip2 for saving build environment when available
Browse files Browse the repository at this point in the history
This will keep the mood down when building kernels :)
  • Loading branch information
thomas committed Aug 15, 2018
1 parent 43cbac1 commit 034ce8c
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions src/beesh.sh.in
Original file line number Diff line number Diff line change
Expand Up @@ -674,7 +674,7 @@ function bee_archivebuild() {
mkdir -pv "${BEE_BUILDARCHIVEDIR}"
fi

archive="${BEE_BUILDARCHIVEDIR}/${PKGALLPKG}.beebuild.tar.bz2"
archive="${BEE_BUILDARCHIVEDIR}/${PKGALLPKG}.beebuild.tar"

print_info " -> saving build environment.."
print_info "${COLOR_CYAN}${archive}"
Expand All @@ -683,7 +683,7 @@ function bee_archivebuild() {
B=${BEEWORKDIR}/build
fi

tar -cjf ${archive} \
tar -cf ${archive} \
--show-transformed-names \
--sparse \
--absolute-names \
Expand All @@ -693,6 +693,16 @@ function bee_archivebuild() {
--transform="s,^${BEEWORKDIR},${PKGALLPKG}," \
--transform="s,^${F},${PKGALLPKG}/files," \
--transform="s,^${BEE_BEEDIR},${PKGALLPKG}/files,"

BZIP2=bzip2

if type -p pbzip2 > /dev/null ; then
BZIP2=pbzip2
fi

$BZIP2 ${archive}
archive="${archive}.bz2" # add bz2 for correct bookkeeping

}

function load_buildmagic() {
Expand Down

0 comments on commit 034ce8c

Please sign in to comment.