5 haikuBuildOutputDir
=`dirname $revisionFile`
6 lastBuiltRevisionFile
=${haikuBuildOutputDir}/last-built-revision
18 revision
=`cat ${revisionFile} 2>/dev/null`
19 lastBuiltRevision
=`cat $lastBuiltRevisionFile 2>/dev/null`
25 localRev
=`git rev-parse HEAD`
27 # only determine the haiku-revision if anything has changed from
29 if [ -z "$revision" -o "$lastBuiltRevision" != "$localRev" ]; then
30 # the revision we use is the description of HEAD with respect to the
31 # last reachable hrev-(haiku-revision-)tag
32 revision
=`git describe --dirty --tags --match=hrev*`
33 if [ -z "$revision" ]; then
34 # failed to find any hrev tags, bail out
35 echo "Error: you are using a Haiku clone without tags, please set"
36 echo " the revision tag to use (e.g. HAIKU_REVISION=hrev43210)"
38 elif echo "$revision" |
grep -- '-' >/dev
/null
; then
39 # HEAD is not directly a changeset from Haiku's central repo, so we
40 # add the current branch name as additional info
41 branchName
=`git branch | grep '*' | cut -b 3-`
42 revision
="$revision [$branchName]"
48 if [ -z "$revision" ]; then
52 echo $localRev >${lastBuiltRevisionFile}
53 echo $revision >${revisionFile}