summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Silverstone <dsilvers@netsurf-browser.org>2011-03-15 17:55:13 +0000
committerDaniel Silverstone <dsilvers@netsurf-browser.org>2011-03-15 17:55:13 +0000
commita4b99f5c313d8548e52ddd5c71277e9a7c060d29 (patch)
tree0fd0c851d996d69589bb44e9e0d7da595da75add
parent775a139103fbaebb529d9bbf104598a2c19a4879 (diff)
downloadnetsurf-a4b99f5c313d8548e52ddd5c71277e9a7c060d29.tar.gz
netsurf-a4b99f5c313d8548e52ddd5c71277e9a7c060d29.tar.bz2
Remove use of POSIX.pm from svn-testament -- RISCOS seems to be incomplete in that respect
svn path=/trunk/netsurf/; revision=12062
-rwxr-xr-xutils/svn-testament.pl9
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;
}