Skip to content

Commit

Permalink
bee-download: Replace bzip2 by zstd (Zstandard)
Browse files Browse the repository at this point in the history
It compresses better in size and speed. lz4 is faster but does not
compress as well, so we go the Zstandard route.
  • Loading branch information
pmenzel committed Oct 5, 2020
1 parent 7ca455e commit 78a4f08
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/bee-download.sh.in
Original file line number Diff line number Diff line change
Expand Up @@ -165,18 +165,18 @@ function download_git() {

filename=${OPT_PKGNAME:-${PKGNAME}}-${OPT_VERSION:-${PKGFULLVERSION}}${pkgextraextraversion}

git archive --format=tar --prefix=${filename}/ ${commit} | bzip2 >${filename}.tar.bz2
git archive --format=tar --prefix=${filename}/ ${commit} | zstd >${filename}.tar.zstd

if [ ! -d "${BEE_DOWNLOADDIR}" ] ; then
mkdir -p ${BEE_DOWNLOADDIR}
fi
mv ${filename}.tar.bz2 ${BEE_DOWNLOADDIR}
mv ${filename}.tar.zstd ${BEE_DOWNLOADDIR}

trap - EXIT

rm -fr ${tmp_path}

echo ${BEE_DOWNLOADDIR}/${filename}.tar.bz2
echo ${BEE_DOWNLOADDIR}/${filename}.tar.zstd
}

options=$(${BEE_BINDIR}/beegetopt --name bee-download \
Expand Down

0 comments on commit 78a4f08

Please sign in to comment.