Skip to content

Commit

Permalink
Switch to zstd compression
Browse files Browse the repository at this point in the history
  • Loading branch information
mizdebsk committed Sep 2, 2024
1 parent 13a5794 commit 2fed3a6
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions downstream.sh
Original file line number Diff line number Diff line change
Expand Up @@ -136,17 +136,14 @@ for p; do
prep
elif [[ "$cmd" = archive ]]; then
mkdir -p archive
rm -f archive/$p.tar archive/$p.tar.xz
rm -f archive/$p.tar archive/$p.tar.zst
commit=$($git -C "downstream/$p" rev-parse upstream-base)
date=$($git -C "downstream/$p" cat-file commit $commit | sed -n '/^author /s/.* \([0-9][0-9]* [+-][0-9][0-9]*$\)/\1/;T;p;q')
tree=$($git -C "downstream/$p" cat-file commit $commit | sed -n 's/^tree //;T;p;q')
$git -C "downstream/$p" archive --prefix downstream/$p/ --mtime "$date" "$tree" >archive/$p.tar
zstd --rm -T8 -12 archive/$p.tar
else
echo "$0: unknown command: $cmd" >&2
exit 1
fi
done

if [[ $cmd = archive ]]; then
echo archive/*.tar | xargs -n1 -P20 xz -9evT8
fi

0 comments on commit 2fed3a6

Please sign in to comment.