diff options
Diffstat (limited to 'utils')
-rwxr-xr-x | utils/svn-testament.pl | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/utils/svn-testament.pl b/utils/svn-testament.pl index a1015e60e..3f2065111 100755 --- a/utils/svn-testament.pl +++ b/utils/svn-testament.pl @@ -1,7 +1,6 @@ #!/usr/bin/perl -w use strict; -use POSIX; =head1 @@ -65,7 +64,8 @@ my %userinfo; # The information about the current user # The current date, in AmigaOS version friendly format (dd.mm.yyyy) -my $compiledate = POSIX::strftime("%d.%m.%Y", localtime); +my ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime(); +my $compiledate = sprintf("%d.%d.%d",$mday,$mon+1,$year+1900); chomp $compiledate; # Spew the testament out @@ -78,9 +78,10 @@ $testament .= "#define GECOS \"$userinfo{GECOS}\"\n"; my $qroot = $root; $qroot =~ s/"/\\"/g; -my $hostname = POSIX::uname()[1]; +my $hostname = $ENV{HOSTNAME}; -if ( !defined ( $hostname ) ) { # Try hostname command if env-var empty +unless ( defined($hostname) && $hostname ne "") { + # Try hostname command if env-var empty $hostname = `hostname`; chomp $hostname; } |