From: Matthias Krüger Date: Thu, 29 Dec 2016 15:46:46 +0000 (+0100) Subject: add script to unconvert back into pk3 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=refs%2Fheads%2Fmatthiaskrgr%2Fpk3_compr;p=xonotic%2Fxonotic.git add script to unconvert back into pk3 --- diff --git a/uncompress_squashfs.pk3 b/uncompress_squashfs.pk3 new file mode 100755 index 00000000..d3c33ab5 --- /dev/null +++ b/uncompress_squashfs.pk3 @@ -0,0 +1,23 @@ +#!/bin/bash +inputPK3=$1 + +echo "Extracting" +unsquashfs -d extractDir ${inputPK3} +cd extractDir + +#$FLIF needs to point towards the flif binary + +echo "Converting" +for file in `find . | grep "\.flif"`; do # in theory we could make this parallel + $FLIF -e ${file} "${file%.flif}.png" # flif -> png + convert "${file%.flif}.png" "${file%.flif}.tga" # png -> tga + rm $file # rm flif + rm ${file%.flif}.png # rm png +done + +echo "Compressing" +cd .. +echo `pwd` +zip -9 -r ${inputPK3%.sqfs}.pk3 extractDir/* + +rm -r extractDir # clean up