Author: tdb01r
Date: 2007-11-28 13:38:24 +0000 (Wed, 28 Nov 2007)
New Revision: 61
Added:
branches/stable-1.0.x/makedist.pl
Modified:
branches/stable-1.0.x/Makefile.in
branches/stable-1.0.x/install.pl.in
Log:
* Merged [57:60]
Modified: branches/stable-1.0.x/Makefile.in
===================================================================
--- branches/stable-1.0.x/Makefile.in 2007-11-28 13:36:46 UTC (rev 60)
+++ branches/stable-1.0.x/Makefile.in 2007-11-28 13:38:24 UTC (rev 61)
@@ -13,10 +13,10 @@
install:
$(PERL) $(INSTALLPL) etc/irstats.conf $(SYSCONFDIR)
- $(PERL) $(INSTALLPL) perl_lib $(IRSTATS_LIB)
+ $(PERL) $(INSTALLPL) --force perl_lib $(IRSTATS_LIB)
$(PERL) $(INSTALLPL) cgi/irstats.cgi $(CGI_DIR)
chmod 0755 $(CGI_DIR)/irstats.cgi
- $(PERL) $(INSTALLPL) htdocs $(WWW_DIR)
+ $(PERL) $(INSTALLPL) --force htdocs $(WWW_DIR)
$(PERL) $(INSTALLPL) var $(LOCALSTATEDIR)
chmod 0777 $(WWW_DIR)/graphs
chmod 0777 $(LOCALSTATEDIR)/cache/irstats
Modified: branches/stable-1.0.x/install.pl.in
===================================================================
--- branches/stable-1.0.x/install.pl.in 2007-11-28 13:36:46 UTC (rev 60)
+++ branches/stable-1.0.x/install.pl.in 2007-11-28 13:38:24 UTC (rev 61)
@@ -2,7 +2,14 @@
use strict;
use File::Copy;
+use Getopt::Long;
+my( $opt_force );
+
+GetOptions(
+ 'force' => \$opt_force,
+);
+
my( $src_file, $dest_dir ) = @ARGV;
unless( 2 == scalar @ARGV )
@@ -41,8 +48,17 @@
my @parts = split /\//, $file;
my $filename = $parts[$#parts];
my $target = "$dir/$filename";
- copy($file, $target) or die "Error copying $file to $target: $!";
- chown($uid,$gid,$target);
+ if( -e $target and not $opt_force )
+ {
+ $target = "$target.new";
+ copy($file, $target) or die "Error copying $file to $target: $!";
+ chown($uid,$gid,$target);
+ }
+ else
+ {
+ copy($file, $target) or die "Error copying $file to $target: $!";
+ chown($uid,$gid,$target);
+ }
}
elsif( -d $file )
{
Copied: branches/stable-1.0.x/makedist.pl (from rev 60, trunk/irstats/makedist.pl)
===================================================================
--- branches/stable-1.0.x/makedist.pl (rev 0)
+++ branches/stable-1.0.x/makedist.pl 2007-11-28 13:38:24 UTC (rev 61)
@@ -0,0 +1,38 @@
+#!/usr/bin/perl
+
+use strict;
+
+use Getopt::Long;
+
+use constant {
+ PACKAGE_NAME => 'irstats',
+ EXT => '.tar.gz',
+ REPOSITORY => 'http://svn.eprints.org/irstats'
+};
+
+my( $opt_version );
+
+$opt_version = shift @ARGV or die "Usage: $0 <version>\n";
+
+my $path;
+
+if( $opt_version =~ /x$/ )
+{
+ $path = "branches/stable-$opt_version";
+}
+else
+{
+ $path = "tags/$opt_version";
+}
+
+my $tarball = &PACKAGE_NAME."-$opt_version";
+
+system('rm','-rf',$tarball);
+system('svn','export','--quiet',REPOSITORY."/$path",$tarball);
+chdir($tarball);
+system('autoconf');
+chdir('..');
+system('tar','-czf',$tarball.EXT,$tarball);
+system('rm','-rf',$tarball);
+
+system('md5sum',$tarball.EXT);