File: Resource-Files.html

package info (click to toggle)
stow 2.4.1-2
  • links: PTS
  • area: main
  • in suites: forky, sid, trixie
  • size: 2,304 kB
  • sloc: perl: 4,355; sh: 710; makefile: 184
file content (148 lines) | stat: -rw-r--r-- 6,654 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
<!DOCTYPE html>
<html>
<!-- Created by GNU Texinfo 7.0.3, https://www.gnu.org/software/texinfo/ -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<!-- This manual describes GNU Stow version 2.4.1
(8 September 2024), a program for managing farms of symbolic links.

Software and documentation is copyrighted by the following:

© 1993, 1994, 1995, 1996 Bob Glickstein bobg+stow@zanshin.com


© 2000, 2001 Guillaume Morin gmorin@gnu.org


© 2007 Kahlil (Kal) Hodgson kahlil@internode.on.net


© 2011 Adam Spiers stow@adamspiers.org

Permission is granted to make and distribute verbatim copies of this
manual provided the copyright notice and this permission notice are
preserved on all copies.


Permission is granted to copy and distribute modified versions of this
manual under the conditions for verbatim copying, provided also that the
section entitled "GNU General Public License" is included with the
modified manual, and provided that the entire resulting derived work is
distributed under the terms of a permission notice identical to this
one.

Permission is granted to copy and distribute translations of this manual
into another language, under the above conditions for modified versions,
except that this permission notice may be stated in a translation
approved by the Free Software Foundation. -->
<title>Resource Files (Stow)</title>

<meta name="description" content="Resource Files (Stow)">
<meta name="keywords" content="Resource Files (Stow)">
<meta name="resource-type" content="document">
<meta name="distribution" content="global">
<meta name="Generator" content="makeinfo">
<meta name="viewport" content="width=device-width,initial-scale=1">

<link href="index.html" rel="start" title="Top">
<link href="Index.html" rel="index" title="Index">
<link href="index.html#SEC_Contents" rel="contents" title="Table of Contents">
<link href="index.html" rel="up" title="Top">
<link href="Compile_002dtime-vs_002e-Install_002dtime.html" rel="next" title="Compile-time vs. Install-time">
<link href="Target-Maintenance.html" rel="prev" title="Target Maintenance">
<style type="text/css">
<!--
div.example {margin-left: 3.2em}
-->
</style>


</head>

<body lang="en">
<div class="chapter-level-extent" id="Resource-Files">
<div class="nav-panel">
<p>
Next: <a href="Compile_002dtime-vs_002e-Install_002dtime.html" accesskey="n" rel="next">Compile-time vs. Install-time</a>, Previous: <a href="Target-Maintenance.html" accesskey="p" rel="prev">Target Maintenance</a> &nbsp; [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Index.html" title="Index" rel="index">Index</a>]</p>
</div>
<hr>
<h2 class="chapter" id="Resource-Files-1">11 Resource Files</h2>
<a class="index-entry-id" id="index-resource-files"></a>
<a class="index-entry-id" id="index-configuration-files"></a>

<p>Default command line options may be set in <samp class="file">.stowrc</samp> (current
directory) or <samp class="file">~/.stowrc</samp> (home directory). These are parsed in
that order, and are appended together if they both exist. The effect of
the options in the resource file is similar to simply prepending the
options to the command line. This feature can be used for some
interesting effects.
</p>
<p>For example, suppose your site uses more than one stow directory, perhaps in
order to share around responsibilities with a number of systems
administrators. One of the administrators might have the following in their
<samp class="file">~/.stowrc</samp> file:
</p>
<div class="example">
<pre class="example-preformatted">--dir=/usr/local/stow2
--target=/usr/local
--ignore='~'
--ignore='^CVS'
</pre></div>

<p>so that the <code class="command">stow</code> command will default to operating on the
<samp class="file">/usr/local/stow2</samp> directory, with <samp class="file">/usr/local</samp> as the
target, and ignoring vi backup files and CVS directories.
</p>
<p>If you had a stow directory <samp class="file">/usr/local/stow/perl-extras</samp> that
was only used for Perl modules, then you might place the following in
<samp class="file">/usr/local/stow/perl-extras/.stowrc</samp>:
</p>
<div class="example">
<pre class="example-preformatted">--dir=/usr/local/stow/perl-extras
--target=/usr/local
--override=bin
--override=man
--ignore='perllocal\.pod'
--ignore='\.packlist'
--ignore='\.bs'
</pre></div>

<p>so that when you are in the <samp class="file">/usr/local/stow/perl-extras</samp>
directory, <code class="command">stow</code> will regard any subdirectories as stow
packages, with <samp class="file">/usr/local</samp> as the target (rather than the
immediate parent directory <samp class="file">/usr/local/stow</samp>), overriding any
pre-existing links to bin files or man pages, and ignoring some cruft
that gets installed by default.
</p>
<p>If an option is provided both on the command line and in a resource file,
the command line option takes precedence. For options that provide a single
value, such as <code class="command">--target</code> or <code class="command">--dir</code>, the command line
option will overwrite any options in the resource file. For options that can
be given more than once, <code class="command">--ignore</code> for example, command line
options and resource options are appended together.
</p>
<p>For options that take a file path, environment variables and the tilde
character (<code class="command">~</code>) are expanded. An environment variable can be
given in either the <code class="command">$VAR</code> or <code class="command">${VAR}</code> form. To
prevent expansion, escape the <code class="command">$</code> or <code class="command">~</code> with a
backslash.  Since these values are first subject to standard shell
quoting rules, if you want special characters such as <code class="command">\b</code> or
<code class="command">$</code> to be treated as regular expression assertions then they
will need extra escaping, i.e. <code class="command">\\b</code> and <code class="command">\\\$</code>
respectively.
</p>
<p>The options <code class="command">-D</code>, <code class="command">-S</code>, and <code class="command">-R</code> are ignored in
resource files. This is also true of any package names given in the
resource file.
</p>
</div>
<hr>
<div class="nav-panel">
<p>
Next: <a href="Compile_002dtime-vs_002e-Install_002dtime.html">Compile-time vs. Install-time</a>, Previous: <a href="Target-Maintenance.html">Target Maintenance</a> &nbsp; [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Index.html" title="Index" rel="index">Index</a>]</p>
</div>



</body>
</html>