From mboxrd@z Thu Jan 1 00:00:00 1970 From: cgit at cryptocrack.de (Lukas Fleischer) Date: Wed, 05 Feb 2014 11:23:31 +0100 Subject: [PATCH] gen-version.sh: check if git is available before trying to call it In-Reply-To: <52ED0E74.6030002@jetable.org> References: <52EC2B82.7020300@jetable.org> <52ECF565.1030201@jetable.org> <20140201135646.GA29976@serenity.lan> <3386636.h5ksx6Nyhk@al> <52ED0E74.6030002@jetable.org> Message-ID: <20140205102331.11006.5061@typhoon.lan> On Sat, 01 Feb 2014 at 16:10:44, Fabien C. wrote: > [...] > if test "$(git rev-parse --git-dir 2>/dev/null)" = '.git' > then > V=$(git describe --abbrev=4 HEAD 2>/dev/null) > fi > > I think this one solves the above problems. I personally like this approach. Jason? > > Regards, > Fabien > > [1]: http://pubs.opengroup.org/onlinepubs/9699919799/utilities/command.html > > > _______________________________________________ > CGit mailing list > CGit at lists.zx2c4.com > http://lists.zx2c4.com/mailman/listinfo/cgit