homebrewfilter/distribute

102 lines
1.8 KiB
Plaintext
Raw Normal View History

2012-03-12 13:00:33 +01:00
#!/bin/bash
2012-03-18 23:16:30 +01:00
compile_hbf ()
{
make -C main/ || exit 1
2012-03-18 23:16:30 +01:00
}
compile_boot ()
{
2012-04-08 20:12:11 +02:00
if [[ -e $PWD/hbf.dol && ! $FORCE ]]; then
cp main/hbf.dol boot/source/hbf.dol
2012-03-18 23:16:30 +01:00
make -C boot/ || exit 1
else compile_hbf
cp main/hbf.dol boot/source/hbf.dol
2012-03-18 23:16:30 +01:00
make -C boot/ || exit 1
fi
}
compile_installer ()
{
2012-04-08 20:12:11 +02:00
if [[ -e boot/hbf_boot.dol && ! $FORCE ]]; then
2012-04-17 20:08:04 +02:00
cp boot/hbf_boot.dol installer/wad/00000001.app
2012-03-18 23:16:30 +01:00
else compile_boot
2012-04-17 20:08:04 +02:00
cp boot/hbf_boot.dol installer/wad/00000001.app
2012-03-18 23:16:30 +01:00
fi
2012-04-17 20:08:04 +02:00
wine tools/WadMii.exe -input "Z:\home\chris\Projekte\homebrewfilter\installer\wad" -output "Z:\home\chris\Projekte\homebrewfilter\installer\data\install.wad"
sleep 5
2012-04-13 21:24:45 +02:00
2012-03-18 23:16:30 +01:00
if [[ -e installer/data/install.wad ]]; then
2012-03-18 23:17:09 +01:00
make -C installer || exit 1
2012-03-18 23:16:30 +01:00
else echo -e "--Error installer/data/install.wad not found--"
exit 1
fi
}
make_distribution ()
{
2012-04-08 20:12:11 +02:00
if [[ -e installer/installer.dol && ! $FORCE ]]; then
cp installer/installer.dol HomebrewFilter/boot.dol
2012-03-18 23:16:30 +01:00
else compile_installer
2012-04-08 20:12:11 +02:00
cp installer/installer.dol HomebrewFilter/boot.dol
2012-03-18 23:16:30 +01:00
fi
XREV=$(grep "define SVN_REV" svnrev/svnrev.c | gawk '{print $3}')
cp main/data/meta.xml.in HomebrewFilter/meta.xml
2012-03-18 23:16:30 +01:00
sed -e "s/@REV@/$XREV/g" -i HomebrewFilter/meta.xml
2012-03-20 20:19:34 +01:00
sed -e '/./{H;$!d;}' -e "x;/rev$XREV/!d;" updates >> HomebrewFilter/meta.xml
2012-03-18 23:16:30 +01:00
echo -e "\n </long_description>\n</app>" >> HomebrewFilter/meta.xml
}
make_filelist()
{
ARC=$1
THM=$(basename $1 .zip)
unp -U $1
cd $THM/
for i in $(ls -1 *.png *.xml); do \
echo "$THM/file:$i" >> temp ; \
cat temp | tr "\n" "+" > filelist ; \
done
}
case $1 in
"-c" )
make -C main clean
make -C boot clean
make -C installer clean
2012-04-18 20:40:53 +02:00
rm -f HomebrewFilter/{boot.dol,meta.xml}
;;
"-l" )
make_filelist $2
;;
"-f" )
FORCE=YES
make_distribution
;;
"-b" )
FORCE=YES
compile_boot
;;
* )
make_distribution
;;
2012-04-17 20:08:04 +02:00
esac