mirror of
https://gitlab.com/Nanolx/homebrewfilter.git
synced 2024-12-26 17:41:48 +01:00
f2eddb3497
move main source under main/ update distribute
112 lines
2.0 KiB
Bash
Executable File
112 lines
2.0 KiB
Bash
Executable File
#!/bin/bash
|
|
|
|
compile_hbf ()
|
|
{
|
|
make -C main/ || exit 1
|
|
}
|
|
|
|
compile_boot ()
|
|
{
|
|
if [[ -e $PWD/hbf.dol && ! $FORCE ]]; then
|
|
cp main/hbf.dol boot/source/hbf.dol
|
|
make -C boot/ || exit 1
|
|
else compile_hbf
|
|
cp main/hbf.dol boot/source/hbf.dol
|
|
make -C boot/ || exit 1
|
|
fi
|
|
|
|
}
|
|
|
|
compile_installer ()
|
|
{
|
|
if [[ -e boot/hbf_boot.dol && ! $FORCE ]]; then
|
|
cp boot/hbf_boot.dol installer/wad/00000002.app
|
|
else compile_boot
|
|
cp boot/hbf_boot.dol installer/wad/00000002.app
|
|
fi
|
|
|
|
if [[ $CHNL == "COMEX" ]]; then
|
|
wine tools/WadMii.exe -input "Z:\home\chris\Projekte\homebrewfilter\installer\wad" -output "Z:\home\chris\Projekte\homebrewfilter\installer\data\install.wad"
|
|
sleep 5
|
|
else
|
|
wine tools/WadMii.exe -input "Z:\home\chris\Projekte\homebrewfilter\installer\wad" -output "Z:\home\chris\Projekte\homebrewfilter\installer\THBF.wad"
|
|
sleep 5
|
|
mono tools/CustomizeMii.exe
|
|
fi
|
|
|
|
if [[ -e installer/data/install.wad ]]; then
|
|
make -C installer || exit 1
|
|
else echo -e "--Error installer/data/install.wad not found--"
|
|
exit 1
|
|
fi
|
|
|
|
}
|
|
|
|
make_distribution ()
|
|
{
|
|
|
|
if [[ -e installer/installer.dol && ! $FORCE ]]; then
|
|
cp installer/installer.dol HomebrewFilter/boot.dol
|
|
else compile_installer
|
|
cp installer/installer.dol HomebrewFilter/boot.dol
|
|
fi
|
|
|
|
XREV=$(grep "define SVN_REV" svnrev/svnrev.c | gawk '{print $3}')
|
|
|
|
cp main/data/meta.xml.in HomebrewFilter/meta.xml
|
|
|
|
sed -e "s/@REV@/$XREV/g" -i HomebrewFilter/meta.xml
|
|
sed -e '/./{H;$!d;}' -e "x;/rev$XREV/!d;" updates >> HomebrewFilter/meta.xml
|
|
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
|
|
;;
|
|
|
|
"-l" )
|
|
make_filelist $2
|
|
;;
|
|
|
|
"-f" )
|
|
FORCE=YES
|
|
make_distribution
|
|
;;
|
|
|
|
"-o" )
|
|
FORCE=YES
|
|
CHNL=COMEX
|
|
make_distribution
|
|
;;
|
|
|
|
"-b" )
|
|
FORCE=YES
|
|
compile_boot
|
|
;;
|
|
|
|
* )
|
|
make_distribution
|
|
;;
|
|
|
|
esac |