[PATCH] qmake: use a dedicated build script to generate ssrf-version.h
Thiago Macieira
thiago at macieira.org
Thu Feb 12 18:07:21 PST 2015
On Thursday 12 February 2015 23:11:02 Lubomir I. Ivanov wrote:
> git --version 2> /dev/null
>
> /dev/null is supported in cmd as well.
>
> if the 'git' command fails, HAS_GIT should contain no value since
> stderr is piped to the null device.
You could do this:
if gitpwd=`git rev-parse --show-toplevel 2>/dev/null`; then
FULL_VER=`sh "$gitpwd/scripts/get-version" linux`
else
FULL_VER=`cat .gitversion 2> /dev/null || echo $VERSION`
fi
That checks at the same time for git's presence and that we're in a git
repository.
--
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
Software Architect - Intel Open Source Technology Center
PGP/GPG: 0x6EF45358; fingerprint:
E067 918B B660 DBD1 105C 966C 33F5 F005 6EF4 5358
More information about the subsurface
mailing list