makenewgrfcfg
echo "generating ottdc_grfpack.cfg"
tree -if ottdc_grfpack | grep -i "GRF$" > ottdc_grfpack.cfg
echo "generating ottdc_grfpack_ttdpatch.cfg"
tree -if ottdc_grfpack_ttdpatch | grep -i "GRF$" > ottdc_grfpack_ttdpatch.cfg
echo "generating newgrfw.cfg"
cat ottdc_grfpack.cfg ottdc_grfpack_ttdpatch.cfg | sed -n -e 's/ottdc_grfpack/newgrf\/ottdc_grfpack/gp' > newgrfw.cfg
#tree -if | grep -i "GRF$" | sed -n -e 's/\.\//newgrf\//gp' > newgrfw.cfg
makepacks
#!/bin/bash
NAME="ottdc_grfpack"
PACK=$NAME
if [ $# -gt 0 ] ; then
VERSION=$1
else
VERSION="r$(date +%F)"
fi
./.makenewgrfcfg
echo "generating grf packs $VERSION..."
#echo "deleting of old packages..."
#rm $PACK*.bz2 $PACK*.gz $PACK*.7z $PACK*.zip $PACK*.rar
#echo "generating $PACK_$VERSION.tar..."
#tar cfh $PACK\_$VERSION.tar $NAME > /dev/null
echo "generating $PACK_$VERSION.tar.bz2..."
tar cfjh $PACK\_$VERSION.tar.bz2 $NAME > /dev/null
echo "generating $PACK_$VERSION.tar.gz..."
tar cfzh $PACK\_$VERSION.tar.gz $NAME > /dev/null
echo "generating $PACK_$VERSION.7z..."
7za a -l -mx=9 $PACK\_$VERSION.7z $NAME > /dev/null
echo "generating $PACK_$VERSION.zip..."
7za a -l -tzip -mx=9 $PACK\_$VERSION.zip $NAME > /dev/null
#zip -r $PACK_$VERSION.zip $NAME
echo "generating $PACK_$VERSION.rar..."
rar a -m5 -mdG -se $PACK\_$VERSION.rar $NAME > /dev/null
echo "All packs made."
chmod a+rX * -R
mirror
rsync -e ssh -avz --delete ./ ottdcoop@ppcis.org:website/blog/files/downloads/grfpacks/
rsync -e ssh -avz --delete ./ottdc_grfpack tt-ms@mozart.ammler.ch:.openttd/data/
rsync -e ssh -avz --delete ./ottdc_grfpack tt-ms@mozart.ammler.ch:.openttd/data/