diff options
author | Gerald Combs <gerald@wireshark.org> | 2014-01-22 18:15:44 +0000 |
---|---|---|
committer | Gerald Combs <gerald@wireshark.org> | 2014-01-22 18:15:44 +0000 |
commit | 2b26c1e216fee43fa7a802e75fd2e28e279cdc7a (patch) | |
tree | fd40e8b6be1c09e600cb10d9818d4ed6d39f5def /docbook/check_git_version.sh | |
parent | 6b7fc8f0efba29450eef9fb7efa2eb488a27df33 (diff) |
Prepare for Git migration.
Mass-replace "svn" with "git". Add commented code to use git to fetch
the repository version.
svn path=/trunk/; revision=54905
Diffstat (limited to 'docbook/check_git_version.sh')
-rwxr-xr-x | docbook/check_git_version.sh | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/docbook/check_git_version.sh b/docbook/check_git_version.sh new file mode 100755 index 0000000000..c26c1e7812 --- /dev/null +++ b/docbook/check_git_version.sh @@ -0,0 +1,44 @@ +#!/bin/bash +# +# Check for SVN version +# +# $Id$ +# +# Wireshark - Network traffic analyzer +# By Gerald Combs <gerald@wireshark.org> +# Copyright 2005 Ulf Lamping +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. +# + +#if [ -d ../.git ] ; then +# GIT_VERSION=`git describe --tags --dirty` +#fi +#echo '<!ENTITY GitVersion "'${GIT_VERSION}'">' > git_version_tmp.xml + +echo -n '<!ENTITY GitVersion "' > git_version_tmp.xml +[ -x svnversion ] && svnversion -n . >> git_version_tmp.xml +echo '">' >> git_version_tmp.xml + +# /dev/null buries the output of the "cmp" command. +diff git_version.xml git_version_tmp.xml &> /dev/null + +if [ $? -ne 0 ] +then + cp git_version_tmp.xml git_version.xml +fi + +rm git_version_tmp.xml + |