[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Stow-devel] commit
From: |
Guillaume Morin |
Subject: |
[Stow-devel] commit |
Date: |
Tue, 8 Jan 2002 23:14:08 +0100 |
User-agent: |
Mutt/1.3.24i |
Since the commit notification did not work, I post the changes I've made
to the CVS repository :
Index: AUTHORS
===================================================================
RCS file: /cvsroot/stow/stow/AUTHORS,v
retrieving revision 1.4
diff -u -r1.4 AUTHORS
--- AUTHORS 2 Jan 2002 16:42:07 -0000 1.4
+++ AUTHORS 8 Jan 2002 22:01:53 -0000
@@ -9,7 +9,10 @@
Charles Briscoe-Smith <address@hidden> wrote the fix to prevent
stow -D / stow -R removing initially-empty directories.
-Adam Lackorzynski <address@hidden> wrote the fix to prevente
+Adam Lackorzynski <address@hidden> wrote the fix which prevents
the generation of wrong links if there are links in the stow directory.
+
+Anthony R Iano-Fletcher <address@hidden>
+contributed the '--subdirs' option.
Stow is currently maintained by Guillaume Morin <address@hidden>.
Index: ChangeLog
===================================================================
RCS file: /cvsroot/stow/stow/ChangeLog,v
retrieving revision 1.10
diff -u -r1.10 ChangeLog
--- ChangeLog 6 Jan 2002 11:19:24 -0000 1.10
+++ ChangeLog 8 Jan 2002 22:01:53 -0000
@@ -1,3 +1,8 @@
+Tue Jan 08 23:00:29 2002 Guillaume Morin <address@hidden>
+
+ * stow.in: added the '--subdir' option.
+ * stow.texi,stow.8: documented '--subdir'
+
Sun Jan 06 12:18:50 2002 Guillaume Morin <address@hidden>
* Makefile.am: use EXTRA_DIST to include manpage in distribution
Index: configure.in
===================================================================
RCS file: /cvsroot/stow/stow/configure.in,v
retrieving revision 1.4
diff -u -r1.4 configure.in
--- configure.in 5 Jan 2002 15:13:40 -0000 1.4
+++ configure.in 8 Jan 2002 22:01:53 -0000
@@ -3,7 +3,7 @@
AC_INIT(stow.in)
PACKAGE=stow
-VERSION=1.3.3
+VERSION=1.3.3pre4
AM_INIT_AUTOMAKE(stow, $VERSION)
AC_SUBST(PACKAGE)
AC_SUBST(VERSION)
Index: stow.8
===================================================================
RCS file: /cvsroot/stow/stow/stow.8,v
retrieving revision 1.2
diff -u -r1.2 stow.8
--- stow.8 5 Jan 2002 15:07:03 -0000 1.2
+++ stow.8 8 Jan 2002 22:01:54 -0000
@@ -6,7 +6,7 @@
.RI [ options ]
.IR package ...
.SH DESCRIPTION
-This manual page describes GNU Stow 1.3.3, a program for managing the
+This manual page describes GNU Stow 1.3.4, a program for managing the
installation of software packages. This is not the definitive
documentation for stow; for that, see the info manual.
.PP
@@ -187,6 +187,13 @@
Set the stow directory to DIR instead of the current directory.
This also has the effect of making the default target directory be
the parent of DIR.
+.TP
+.I "-s DIRS"
+.TP
+.I --subdirs=DIRS
+Set the subdirectories of the package directory that are to be
installed to a
+colon delimited list of directories (e.g. bin:man or bin:lib:man). The
default
+is to install all the subdirectories.
.TP
.I "-t DIR"
.TP
Index: stow.in
===================================================================
RCS file: /cvsroot/stow/stow/stow.in,v
retrieving revision 1.8
diff -u -r1.8 stow.in
--- stow.in 5 Jan 2002 11:27:01 -0000 1.8
+++ stow.in 8 Jan 2002 22:01:54 -0000
@@ -39,6 +39,7 @@
$Stow = undef;
$Target = undef;
$Restow = 0;
address@hidden = ();
# FIXME: use Getopt::Long
@@ -68,6 +69,15 @@
} else {
$Target = shift;
}
+ } elsif ($opt =~ /^s(u(b(d(i(rs?)?)?)?)?)?/i) {
+ $remainder = $';
+ if ($remainder =~ /^=/) {
+ $remainder = $'; # the stuff after the =
+ } else {
+ $remainder = shift; # the following argument
+ }
+ @Subdirs = split(/:/, $remainder);
+ warn "remainder='$remainder' Subdirs = (@Subdirs)\n" if ($Verbose
> 1);
} elsif ($opt =~ /^verb(o(se?)?)?/i) {
$remainder = $';
if ($remainder =~ /^=(\d+)/) {
@@ -105,6 +115,9 @@
$Delete = 1;
} elsif ($_ eq 'R') {
$Restow = 1;
+ } elsif ($_ eq 's') {
+ @Subdirs = split(/:/, (join('', @opts) || shift));
+ @opts = ();
} elsif ($_ eq 'V') {
&version();
} else {
@@ -147,7 +160,7 @@
if (!$Delete || $Restow) {
foreach $Collection (@ARGV) {
warn "Stowing package $Collection...\n" if $Verbose;
- &StowContents($Collection, &RelativePath($Target, $Stow));
+ &StowContents($Collection, &RelativePath($Target, $Stow),
@Subdirs);
}
}
@@ -323,17 +336,25 @@
}
sub StowContents {
- local($dir, $stow) = @_;
+ local($dir, $stow, @subdirs) = @_;
local(@contents);
local($content);
- warn "Stowing contents of $dir\n" if ($Verbose > 1);
+ local $text_subdirs = scalar(@subdirs) ? "/{".join(',',@subdirs)."} "
: " ";
+
+ warn "Stowing contents of $dir in $stow".$text_subdirs."\n" if
($Verbose > 1);
opendir(DIR, &JoinPaths($Stow, $dir))
|| die "$ProgramName: Cannot read directory \"$dir\" ($!)\n";
@contents = readdir(DIR);
closedir(DIR);
foreach $content (@contents) {
next if (($content eq '.') || ($content eq '..'));
+
+ if (scalar(@subdirs)) {
+ warn "Checking $content against (".join(",",@subdirs).")\n" if
($Verbose > 2);
+ next if (!grep($_ eq $content, @subdirs));
+ }
+
if (-d &JoinPaths($Stow, $dir, $content)) {
&StowDir(&JoinPaths($dir, $content), $stow);
} else {
@@ -525,6 +546,8 @@
-c, --conflicts Scan for conflicts, implies -n
-d DIR, --dir=DIR Set stow dir to DIR (default is current dir)
-t DIR, --target=DIR Set target to DIR (default is parent of stow
dir)
+ -s DIR:DIR,
+ --subdirs=DIR:DIR Set subdirs to recurse to DIR:DIR (default is
all subdirs)
-v, --verbose[=N] Increase verboseness (levels are 0,1,2,3;
-v or --verbose adds 1; --verbose=N sets
level)
-D, --delete Unstow instead of stow
Index: stow.texi
===================================================================
RCS file: /cvsroot/stow/stow/stow.texi,v
retrieving revision 1.4
diff -u -r1.4 stow.texi
--- stow.texi 5 Jan 2002 15:10:43 -0000 1.4
+++ stow.texi 8 Jan 2002 22:01:55 -0000
@@ -247,6 +247,13 @@
This also has the effect of making the default target directory be the
parent of @var{dir}.
address@hidden -s @var{dirs}
address@hidden address@hidden
+Set the subdirectories of the package directory that are to be
installed
+to a colon delimited list of directories
+(e.g. @samp{bin:man} or @samp{bin:lib:man}).
+The default is to install all the subdirectories.
+
@item -t @var{dir}
@itemx address@hidden
Set the target directory to @var{dir} instead of the parent of the stow
I don't know what caused the notification problem. I've written to the
Savannah log_accum guy... Stay tuned :-)
--
Guillaume Morin <address@hidden>
Oh, that is nice out there, I think I'll stay for a while (RHCP)
- [Stow-devel] commit,
Guillaume Morin <=