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