File doublecmd.diff of Package doublecmd-deb

 build.sh | 11 ++++++++++-
 clean.sh |  3 +++
 2 files changed, 13 insertions(+), 1 deletion(-)

diff --git a/build.sh b/build.sh
index e8b427eb9..eb07f9d25 100755
--- a/build.sh
+++ b/build.sh
@@ -1,7 +1,16 @@
-#!/bin/sh 
+#!/bin/bash
 
 set -e
 
+# Get revision number
+export VERSION=$(dpkg-parsechangelog | grep '^Version:')
+declare $(echo $VERSION | awk -v FS="(+svn|+git|-)" '{print "REVISION="$2+1" COMMIT="$3}')
+
+# Update dcrevision.inc
+echo "// Created by Git2RevisionInc"   >  src/dcrevision.inc
+echo "const dcRevision = '$REVISION';" >> src/dcrevision.inc
+echo "const dcCommit = '$COMMIT';"     >> src/dcrevision.inc
+
 # You can execute this script with different parameters:
 # components - compiling components needed for doublecmd
 # doublecmd - compiling doublecmd only (release mode)
diff --git a/clean.sh b/clean.sh
index a6afa20e2..6165f7157 100755
--- a/clean.sh
+++ b/clean.sh
@@ -34,3 +34,6 @@ rm -f plugins/wfx/samba/lib/smbauthdlg.lfm
 # Remove debug files
 rm -f  doublecmd.zdli doublecmd.dbg
 rm -rf doublecmd.dSYM
+
+# Remove dcrevision.inc
+rm -f src/dcrevision.inc
openSUSE Build Service is sponsored by