# modified from NiLuJe's autopatch.sh: http://trac.ak-team.com/trac/browser/niluje/Configs/trunk/Kindle/Kobo_Hacks/Patches/autopatch.sh

echo "Uncompressing tarballs"
gunzip -c src/KFmon.tgz > KFMon.tar
gunzip -c out/KoboRoot.tgz > KoboPatch.tar
echo "Merging tarballs"
tar -Avf KFMon.tar KoboPatch.tar
echo "Compressing merged tarball"
gzip KFMon.tar
echo "Collecting garbage"
rm out/KoboRoot.tgz KoboPatch.tar
mv -v KFMon.tar.gz out/KoboRoot.tgz
