mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-20 21:33:47 -07:00
Pass 2; commit 2;
This commit is contained in:
parent
368fe11df0
commit
c74dbb63b8
6 changed files with 77 additions and 34 deletions
|
@ -18,13 +18,23 @@ my $fullgitinfo = 'iceman';
|
|||
my $ctime;
|
||||
# GIT status 0 = dirty, 1 = clean , 2 = undecided
|
||||
my $clean = 2;
|
||||
|
||||
# Do we have acces to git command?
|
||||
my $commandGIT = `bash which git`;
|
||||
#######
|
||||
# solves some bug on macos i.e:
|
||||
##
|
||||
# perl ../tools/mkversion.pl .. > version.c || cp ../common/default_version.c version.c
|
||||
# /usr/bin/which: /usr/bin/which: cannot execute binary file
|
||||
# fatal: No names found, cannot describe anything.
|
||||
##
|
||||
# anyway forcing any kind of shell is at least useless, at worst fatal.
|
||||
my $commandGIT = "env -S which git";
|
||||
|
||||
if ( defined($commandGIT) ) {
|
||||
|
||||
my $githistory = `git fetch --all`;
|
||||
my $gitversion = `git describe --dirty`;
|
||||
# now avoiding the "fatal: No names found, cannot describe anything." error by fallbacking to abbrev hash in such case
|
||||
my $gitversion = `git describe --dirty --always`;
|
||||
my $gitbranch = `git rev-parse --abbrev-ref HEAD`;
|
||||
$clean = $gitversion =~ '-dirty' ? 0 : 1;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue