Next: , Previous: Target Maintenance, Up: Top


11 Resource Files

Default command line options may be set in .stowrc (current directory) or ~/.stowrc (home directory). These are parsed in that order, and effectively prepended to you command line. This feature can be used for some interesting effects.

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 there ~/.stowrc file:

     --dir=/usr/local/stow2
     --target=/usr/local
     --ignore='~'
     --ignore='^CVS'

so that the stow command will default to operating on the /usr/local/stow2 directory, with /usr/local as the target, and ignoring vi backup files and CVS directories.

If you had a stow directory /usr/local/stow/perl-extras that was only used for Perl modules, then you might place the following in /usr/local/stow/perl-extras/.stowrc:

     --dir=/usr/local/stow/perl-extras
     --target=/usr/local
     --override=bin
     --override=man
     --ignore='perllocal\.pod'
     --ignore='\.packlist'
     --ignore='\.bs'

so that the when your are in the /usr/local/stow/perl-extras directory, stow will regard any subdirectories as stow packages, with /usr/local as the target (rather than the immediate parent directory /usr/local/stow), overriding any pre-existing links to bin files or man pages, and ignoring some cruft that gets installed by default.