summaryrefslogtreecommitdiffstats
path: root/src/common/global/svn_revision/svn_revision.sh
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-02-24 18:42:24 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-02-24 18:42:24 +0000
commitf508189682b6fba62e08feeb1596f682bad5fff9 (patch)
tree28aeb0e6c19386c385c1ce5edf8a92c1bca15281 /src/common/global/svn_revision/svn_revision.sh
downloadpiklab-f508189682b6fba62e08feeb1596f682bad5fff9.tar.gz
piklab-f508189682b6fba62e08feeb1596f682bad5fff9.zip
Added KDE3 version of PikLab
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/piklab@1095639 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'src/common/global/svn_revision/svn_revision.sh')
-rwxr-xr-xsrc/common/global/svn_revision/svn_revision.sh20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/common/global/svn_revision/svn_revision.sh b/src/common/global/svn_revision/svn_revision.sh
new file mode 100755
index 0000000..3590568
--- /dev/null
+++ b/src/common/global/svn_revision/svn_revision.sh
@@ -0,0 +1,20 @@
+if [ -d .svn ]; then
+ ( echo '// generated file';
+ printf '#define SVN_REVISION "';
+ (svnversion -n .);
+ echo '"' ) > svn_revision.h.new;
+ if [ ! -f svn_revision.h ]; then
+ mv -f svn_revision.h.new svn_revision.h;
+ else
+ if cmp svn_revision.h svn_revision.h.new; then
+ rm -f svn_revision.h.new;
+ else
+ mv -f svn_revision.h.new svn_revision.h;
+ fi
+ fi
+fi
+if [ ! -f svn_revision.h ]; then
+ ( echo '// generated file';
+ echo '#define SVN_REVISION "distribution"'; ) > svn_revision.h;
+fi
+