From: Matthias Krüger Date: Thu, 29 Dec 2016 15:07:31 +0000 (+0100) Subject: add hacky script to losslessly compress pk3s using flif and squashfs. X-Git-Url: http://git.xonotic.org/?p=xonotic%2Fxonotic.git;a=commitdiff_plain;h=b92d166c6059368f19ace17debd25f802ed26ae1 add hacky script to losslessly compress pk3s using flif and squashfs. --- diff --git a/compress_pk3.sh b/compress_pk3.sh new file mode 100755 index 00000000..8ef719ab --- /dev/null +++ b/compress_pk3.sh @@ -0,0 +1,19 @@ +#!/bin/bash +inputPk3 = $1 + +echo "Extracting" +unzip -d extractDir $1 +cd extractDir + +echo "Converting" +for file in `find . | grep "\.tga"`; do # in theory we could make this parallel + convert ${file} "${file%.tga}.png" # tga -> png + $FLIF -e "${file%.tga}.png" "${file%.tga}.flif" # png -> flif + rm $file # rm tga + rm ${file%.tga}.png # rm png +done + +echo "Compressing" +mksquashfs * ../${1}.sqfs -comp xz -Xdict-size "100%" +cd .. # clean up +rm -r extractDir