Stow directory now defaults to STOW_DIR environment variable if set.
This commit is contained in:
parent
801446a5eb
commit
090519496c
4 changed files with 15 additions and 13 deletions
|
@ -49,6 +49,10 @@ Sun Nov 25 19:31:32 2007 Kahlil Hodgson <kahlil@internode.con.net>
|
|||
|
||||
* stow.8: update to reflect Version 2 changes.
|
||||
|
||||
Sat Jan 26 16:15:21 2002 Guillaume Morin <gmorin@gnu.org>
|
||||
|
||||
* stow.in: if $ENV{'STOW_DIR'} is set, this becomes the default
|
||||
Stow directory.
|
||||
|
||||
Sun Jan 06 12:18:50 2002 Guillaume Morin <gmorin@gnu.org>
|
||||
|
||||
|
|
3
stow.8
3
stow.8
|
@ -146,7 +146,8 @@ The target of a relative symlink is
|
|||
computed starting from the symlink's own directory. Stow only creates
|
||||
relative symlinks.
|
||||
.SH OPTIONS
|
||||
The stow directory is assumed to be the current directory, and the
|
||||
The stow directory is assumed to be the value of the 'STOW_DIR' environment
|
||||
variable or if unset the current directory, and the
|
||||
target directory is assumed to be the parent of the current directory
|
||||
(so it is typical to execute
|
||||
.I stow
|
||||
|
|
5
stow.in
5
stow.in
|
@ -358,9 +358,10 @@ sub set_stow_path {
|
|||
|
||||
my $current_dir = getcwd();
|
||||
|
||||
# default stow dir is the current directory
|
||||
# default stow dir is $STOW_DIR if set, otherwise the current
|
||||
# directory
|
||||
if (not $Option{'dir'} ) {
|
||||
$Option{'dir'} = getcwd();
|
||||
$Option{'dir'} = exists $ENV{STOW_DIR} ? $ENV{STOW_DIR} : getcwd();
|
||||
}
|
||||
if (not chdir($Option{'dir'})) {
|
||||
error("Cannot chdir to target tree: '$Option{'dir'}'");
|
||||
|
|
12
stow.texi
12
stow.texi
|
@ -243,10 +243,6 @@ Each @var{package} is the name of a package (e.g., @samp{perl}) in the stow
|
|||
directory that we wish to install into (or delete from) the target directory.
|
||||
The default action is to install the given packages, although alternate actions
|
||||
may be specified by preceding the package name(s) with an @var{action flag}.
|
||||
Unless otherwise specified, the stow directory is assumed to be
|
||||
the current directory and the target directory is assumed to be the parent of
|
||||
the current directory, so it is typical to execute @code{stow} from the
|
||||
directory @file{/usr/local/stow}.
|
||||
|
||||
@noindent
|
||||
The following options are supported:
|
||||
|
@ -255,14 +251,14 @@ The following options are supported:
|
|||
|
||||
@item -d @var{dir}
|
||||
@itemx --dir=@var{dir}
|
||||
Set the stow directory to @var{dir} instead of the current directory.
|
||||
This also has the effect of making the default target directory be the
|
||||
parent of @var{dir}.
|
||||
Set the stow directory to @var{dir}. Defaults to the value of the environment
|
||||
variable @code{STOW_DIR} if set, or the current directory otherwise.
|
||||
|
||||
@item -t @var{dir}
|
||||
@itemx --target=@var{dir}
|
||||
Set the target directory to @var{dir} instead of the parent of the stow
|
||||
directory.
|
||||
directory. Defaults to the parent of the stow directory, so it is typical to
|
||||
execute @code{stow} from the directory @file{/usr/local/stow}.
|
||||
|
||||
@item --ignore='<regex>'
|
||||
This (repeatable) option lets you suppress acting on files that match the
|
||||
|
|
Loading…
Reference in a new issue