~ chicken-core (chicken-5) 75cf6f4c5c8e7fec8204e3b83b9ffc8963b96b36


commit 75cf6f4c5c8e7fec8204e3b83b9ffc8963b96b36
Author:     felix <felix@call-with-current-continuation.org>
AuthorDate: Tue Aug 23 22:12:40 2011 +0200
Commit:     felix <felix@call-with-current-continuation.org>
CommitDate: Tue Aug 23 22:12:40 2011 +0200

    Revert "some changes based on suggestion by Joerg Wittenberger"
    
    Not sure about this anymore. It worked so far well enough.
    
    This reverts commit 726b770796e24745685fa042d571400d8f1332f1.

diff --git a/identify.sh b/identify.sh
index 644ad35c..a36afcf9 100644
--- a/identify.sh
+++ b/identify.sh
@@ -5,16 +5,13 @@
 # usage: identify.sh SOURCEDIR
 
 
+# make sure file exists anyway, since branchname is a special case
 if test \! -e "buildbranch"; then
     touch buildbranch
 fi
 
-if test \! -e "buildid"; then
-    touch buildid
-fi
-
 rev0=`cat buildid || echo ""`
-branchname0=`cat buildbranch`
+branchname0=`cat buildbranch || echo ""`
 tag0=`cat buildtag.h || echo ""`
 buildtime=`date +%Y-%m-%d`
 host=`hostname`
@@ -23,24 +20,20 @@ usys=`uname`
 if test -d "$1/.git"; then
     rev=`GIT_DIR="$1/.git" git rev-parse --short HEAD 2>/dev/null`
     branchname=`GIT_DIR="$1/.git" git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/\1/'`
-fi
-
-tag="#define C_BUILD_TAG \"compiled ${buildtime} on ${host} (${usys})\""
-
-case "${branchname}" in
-    "") branchname="";;
-    "(no branch)") branchname="";;
-    "master") branchname="";;
-esac
-
-if test "${rev0}" \!= "${rev}"; then
-    echo ${rev} >buildid
-fi
-
-if test "${branchname0}" \!= "${branchname}"; then
-    echo ${branchname} >buildbranch
-fi
-
-if test "${tag0}" \!= "${tag}"; then
-    echo ${tag} >buildtag.h
+    tag="#define C_BUILD_TAG \"compiled ${buildtime} on ${host} (${usys})\""
+
+    case "${branchname}" in
+	"") branchname="";;
+        "(no branch)") branchname="";;
+	"master") branchname="";;
+    esac
+    if test "${rev0}" \!= "${rev}"; then
+	echo ${rev} >buildid
+    fi
+    if test "${branchname0}" \!= "${branchname}"; then
+	echo ${branchname} >buildbranch
+    fi
+    if test "${tag0}" \!= "${tag}"; then
+	echo ${tag} >buildtag.h
+    fi
 fi
Trap