my $githistory = `git fetch --all`;
my $gitversion = `git describe --dirty`;
my $gitbranch = `git rev-parse --abbrev-ref HEAD`;
-my $clean = 2;
-my @compiletime = gmtime();
+my $clean = $gitversion =~ '-dirty' ? 0 : 1;
+my @compiletime = localtime();
-my $fullgitinfo = 'iceman' . $gitbranch . '/' . $gitversion;
+my $fullgitinfo = 'iceman';
+
+if ( defined $gitbranch and defined $gitversion ) {
+ $fullgitinfo = $fullgitinfo.'/'. $gitbranch . '/' . $gitversion;
+} else {
+ $fullgitinfo = $fullgitinfo.'/master/release-build (no_git)';
+}
$fullgitinfo =~ s/(\s)//g;