#!/bin/bash
#script which automates some standard things when porting mame-dos

#clean up a bit
rm -fR allegro.h cfg hi inp obj pcx sta roms samples images artwork ym2203.opm mame.zif MAME.ZIP

#create doc dir and unixy
mkdir doc
mv cheat.dat *.txt *.doc *.1st doc
mv HISTORY.DAT doc/history.dat
cd doc
d2u *
rm -f *.orig *~
mv readme.txt readme.dos
cd ..

#fix comments & includes
cd src
fix-comments `find -name "*.c"`
fix-comments `find -name "*.h"`
d2u `find -name "*.txt"`
rm `find -name "*.orig"`
cd ..

#mv makefile makefile.dos and unixy
mv makefile makefile.dos
d2u makefile.dos
rm -f makefile.dos.orig makefile.dos~
