Subversion Repositories Projects

Rev

Rev 461 | Rev 498 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed

#!/bin/sh
#/****************************************************************************
# *   Copyright (C) 2009 by Claas Anders "CaScAdE" Rathje                    *
# *   admiralcascade@gmail.com                                               *
# *   Project-URL: http://www.mylifesucks.de/oss/c-osd/                      *
# *                                                                          *
# *   This program is free software; you can redistribute it and/or modify   *
# *   it under the terms of the GNU General Public License as published by   *
# *   the Free Software Foundation; either version 2 of the License.         *
# *                                                                          *
# *   This program is distributed in the hope that it will be useful,        *
# *   but WITHOUT ANY WARRANTY; without even the implied warranty of         *
# *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the          *
# *   GNU General Public License for more details.                           *
# *                                                                          *
# *   You should have received a copy of the GNU General Public License      *
# *   along with this program; if not, write to the                          *
# *   Free Software Foundation, Inc.,                                        *
# *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.              *
# ****************************************************************************/

DATE=`date +%Y%m%d-%H%M`
#DATE="20090523-1150"

# build pal hex
export CFLAGS="-DBUILDDATE=\\\"${DATE}\\\" "
make clean
make
mv C-OSD.hex C-OSD-${DATE}-pal.hex

#build pal hex FCONLY
export CFLAGS="-DFCONLY=1 -DBUILDDATE=\\\"${DATE}\\\" "
make clean
make
mv C-OSD.hex C-OSD-${DATE}-pal-fconly.hex

# build ntsc hex
export CFLAGS="-DNTSC=1 -DBUILDDATE=\\\"${DATE}\\\" "
make clean
make
mv C-OSD.hex C-OSD-${DATE}-ntsc.hex

# build ntsc hex FCONLY
export CFLAGS="-DNTSC=1 -DFCONLY=1 -DBUILDDATE=\\\"${DATE}\\\" "
make clean
make
mv C-OSD.hex C-OSD-${DATE}-ntsc-fconly.hex

# buil all character files
CHARFILES="112 128 136 144 152 160 168 176 184 192 200 208 216 224 232"
for i in $CHARFILES; do
        make clean
        export CFLAGS="-DWRITECHARS=${i} -DBUILDDATE=\\\"${DATE}\\\" "
        make
        TILL=`echo $i + 7 | bc`
        mv C-OSD.hex C-OSD-characters-${i}-${TILL}.hex
done

# clean up
make clean

md5sum *.hex

# pack all stuff
mkdir C-OSD-${DATE}
mv *.hex C-OSD-${DATE}
cp ../CHANGE.LOG C-OSD-${DATE}
cp ../LICENSE.TXT C-OSD-${DATE}
cp ../README.TXT C-OSD-${DATE}
zip -r -9 -q C-OSD-${DATE}.zip C-OSD-${DATE}
#rm -rf C-OSD-${DATE}

du -h C-OSD-${DATE}.zip
echo "DONE..."