general timing hacks
[picodrive.git] / platform / pandora / make_pxml.sh
CommitLineData
ab61cff7 1#!/bin/sh
68af34fe 2set -e
ab61cff7 3
68af34fe 4verfile=../common/version.h
5test -f $verfile
6
7major=`head -n 1 $verfile | sed 's/.*"\([0-9]*\)\.\([0-9]*\).*/\1/g'`
8minor=`head -n 1 $verfile | sed 's/.*"\([0-9]*\)\.\([0-9]*\).*/\2/g'`
9# lame, I know..
10build=`git describe HEAD | grep -- - | sed -e 's/.*\-\(.*\)\-.*/\1/'`
11test -n "$build" || build=0
12
13trap "rm -f $2" ERR
ab61cff7 14
15sed 's/@major@/'$major'/' "$1" > "$2"
16sed -i 's/@minor@/'$minor'/' "$2"
68af34fe 17sed -i 's/@build@/'$build'/' "$2"