File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 4848
4949set -e
5050
51+ ZSTD_CMD=$( which zstd 2> /dev/null) || { echo " Error: zstd not found. Install it with: dnf install zstd" ; exit 1; }
52+
5153TARBALL=" $SOURCE_DIR /linux-$TARFILE_RELEASE .tar.zst"
5254ZSTD_THREADS=" --threads=4"
5355ARCH=$( arch)
6264_GITID=" $( git rev-parse HEAD) "
6365
6466if [ -f " $TARBALL " ]; then
65- TARID=$( zstdcat -qq " $TARBALL " | git get-tar-commit-id 2> /dev/null)
67+ TARID=$( " $ZSTD_CMD " -d -c -qq " $TARBALL " | git get-tar-commit-id 2> /dev/null)
6668 if [ " $_GITID " = " $TARID " ]; then
6769 echo " $( basename " $TARBALL " ) unchanged..."
6870 exit 0
7274
7375echo " Creating $( basename " $TARBALL " ) ..."
7476trap ' [ $? -ne 0 ] && rm -vf "$TARBALL"' EXIT
75- git archive --prefix=" linux-$TARFILE_RELEASE " / --format=tar " $_GITID " | zstd $ZSTD_OPTIONS $ZSTD_THREADS > " $TARBALL " ;
77+ git archive --prefix=" linux-$TARFILE_RELEASE " / --format=tar " $_GITID " | " $ZSTD_CMD " $ZSTD_OPTIONS $ZSTD_THREADS > " $TARBALL " ;
7678
7779echo " Tarball created: $TARBALL "
You can’t perform that action at this time.
0 commit comments