Skip to content

Commit

Permalink
Precompressed archive deduplication.
Browse files Browse the repository at this point in the history
  • Loading branch information
PoneyClairDeLune committed Jan 23, 2025
1 parent 3bd5471 commit c34c35c
Showing 1 changed file with 20 additions and 6 deletions.
26 changes: 20 additions & 6 deletions sh/ghGenerate.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,19 +10,33 @@ cd ..
zopfli --i1 -v pages-build.tar
rm -v pages-build.tar
cd book-gz
tree -ifl | grep -E "${COMPRESS_CRIT}" | while IFS= read -r file; do
zopfli --i1 "$file"
tree -ifl | while IFS= read -r file; do
if [ -f "$file" ]; then
rm -v "$file"
# Is a file
if [ "$(echo "$file" | grep -E "$COMPRESS_CRIT")" != "" ]; then
zopfli --i1 "$file" && echo "Compressed \"${file}\" with Zopfli."
else
echo "File \"${file}\" cannot be compressed."
fi
if [ -f "$file" ]; then
rm -v "$file"
fi
fi
done
tar cvf ../pages-build-gz.tar *
cd ..
cd book-br
tree -ifl | grep -E "${COMPRESS_CRIT}" | while IFS= read -r file; do
brotli -vq 11 "$file"
tree -ifl | while IFS= read -r file; do
if [ -f "$file" ]; then
rm -v "$file"
# Is a file
if [ "$(echo "$file" | grep -E "$COMPRESS_CRIT")" != "" ]; then
brotli -vq 11 "$file"
else
echo "File \"${file}\" cannot be compressed."
fi
if [ -f "$file" ]; then
rm -v "$file"
fi
fi
done
tar cvf ../pages-build-br.tar *
Expand Down

0 comments on commit c34c35c

Please sign in to comment.