<version major="@major@" minor="@minor@" release="0" build="@build@"/>
<author name="notaz" website="http://notaz.gp2x.de/"/>
</package>
-<application id="picodrive.notaz.@major@.@minor@" appdata="picodrive">
+<application id="picodrive.notaz.@major@.@minor@@build_post@" appdata="picodrive">
<titles>
- <title lang="en_US">PicoDrive @major@.@minor@</title>
+ <title lang="en_US">PicoDrive @major@.@minor@@build_post@</title>
</titles>
- <title lang="en_US">PicoDrive @major@.@minor@</title>
+ <title lang="en_US">PicoDrive @major@.@minor@@build_post@</title>
<descriptions>
<description lang="en_US">Genesis/MegaDrive/SegaCD/32x Emulator.</description>
minor=`head -n 1 $verfile | sed 's/.*"\([0-9]*\)\.\([0-9]*\).*/\2/g'`
# lame, I know..
build=`git describe HEAD | grep -- - | sed -e 's/.*\-\(.*\)\-.*/\1/'`
+test -n "$build" && build_post="-$build"
test -n "$build" || build=0
trap "rm -f $2" ERR
-sed 's/@major@/'$major'/' "$1" > "$2"
-sed -i 's/@minor@/'$minor'/' "$2"
-sed -i 's/@build@/'$build'/' "$2"
+sed -e 's/@major@/'$major'/' \
+ -e 's/@minor@/'$minor'/' \
+ -e 's/@build@/'$build'/' \
+ -e 's/@build_post@/'$build_post'/' \
+ "$1" > "$2"