From ec0090cf05d5b28f4e22a6c630ee87a0f46cb727 Mon Sep 17 00:00:00 2001 From: Christopher Roy Bratusek Date: Sun, 18 Mar 2012 23:16:30 +0100 Subject: [PATCH] majorly improved the distribute script --- HomebrewFilter/meta.xml | 9 ------ data/meta.xml.in | 10 +++++++ distribute | 62 ++++++++++++++++++++++++++++++++++++----- updates | 2 +- 4 files changed, 66 insertions(+), 17 deletions(-) delete mode 100644 HomebrewFilter/meta.xml create mode 100644 data/meta.xml.in diff --git a/HomebrewFilter/meta.xml b/HomebrewFilter/meta.xml deleted file mode 100644 index 408edf3..0000000 --- a/HomebrewFilter/meta.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - Homebrew Filter Installer - Nano - rev36 - - Installer - Installiert den Hombrew Filter - diff --git a/data/meta.xml.in b/data/meta.xml.in new file mode 100644 index 0000000..15b243f --- /dev/null +++ b/data/meta.xml.in @@ -0,0 +1,10 @@ + + + HomebrewFilter Installer + Nano + rev@REV@ + + HBF Installer + Installiert den Hombrew Filter + + Ă„nderungen in rev@REV@: diff --git a/distribute b/distribute index 9f9f834..9640479 100755 --- a/distribute +++ b/distribute @@ -1,9 +1,57 @@ #!/bin/bash -make -cp boot.dol boot/source/hbf.dol -make -C boot/ -cp boot/boot.dol installer/wad/00000002.app -wine installer/WadMii.exe -input "Z:\home\chris\Projekte\homebrewfilter\installer\wad" -output "Z:\home\chris\Projekte\homebrewfilter\installer\data\install.wad" -make -C installer -cp installer/boot.dol HomebrewFilter/ +compile_hbf () +{ + make || exit 1 +} + +compile_boot () +{ + if [[ -e $PWD/boot.dol ]]; then + cp boot.dol boot/source/hbf.dol + make -C boot/ || exit 1 + else compile_hbf + cp boot.dol boot/source/hbf.dol + make -C boot/ || exit 1 + fi + +} + +compile_installer () +{ + if [[ -e boot/boot.dol ]]; then + cp boot/boot.dol installer/wad/00000002.app + else compile_boot + fi + + wine installer/WadMii.exe -input "Z:\home\chris\Projekte\homebrewfilter\installer\wad" -output "Z:\home\chris\Projekte\homebrewfilter\installer\data\install.wad" + + sleep 5 + + if [[ -e installer/data/install.wad ]]; then + make -C installer + else echo -e "--Error installer/data/install.wad not found--" + exit 1 + fi + +} + +make_distribution () +{ + + if [[ -e installer/boot.dol ]]; then + cp installer/boot.dol HomebrewFilter/ + else compile_installer + cp installer/boot.dol HomebrewFilter/ + fi + + XREV=$(grep "define SVN_REV" svnrev/svnrev.c | gawk '{print $3}') + + cp data/meta.xml.in HomebrewFilter/meta.xml + + sed -e "s/@REV@/$XREV/g" -i HomebrewFilter/meta.xml + sed -e '/./{H;$!d;}' -e 'x;/rev37/!d;' updates >> HomebrewFilter/meta.xml + echo -e "\n \n" >> HomebrewFilter/meta.xml +} + +make_distribution diff --git a/updates b/updates index ab2e723..53c4633 100644 --- a/updates +++ b/updates @@ -1,4 +1,4 @@ -//rev_Beta: +//rev37: - before updating copy the old boot.dol to prev.dol - BUGFIX: installer no longer crashes when IOS253 exists - ISO253 is no more selectable as IOS to load an app with