No description
Find a file
Charles LeDoux 4d1167ffd7 Parse cli and stowrc files separately
Why:

* We want to selectively apply expansion to:
    * Only options from stowrc files.
    * Only options that take a path.
* This requires ability to:
    * Differentiate cli options from stowrc options
    * Distinguish between individual stowrc options.

This change addresses the need by:

* Options from ARGV and stowrc files are separately parsed, resulting in
  two options hashes.
    * Creating an option hash from stowrc files allows modification of
      specific arguments without having to rely on something like regex
      parsing of the options.

* get_config_file_options modified to return options hash.
    * Uses the same parse_options function that parses ARGV

* Add Hash:Merge to dependencies in order to merge the two option
  hashes.

* process_options() merges the two option hashes.
    * Get option hash for ARGV
    * Get option hash from get_config_file_options().
    * Merge the two hashes with Hash::Merge.
    * Sanitation and checks are ran on the merged options.

* The options -S, -D, and -R are ignored in stowrc files.
    * Due to the way argument parsing happens, the effect of these
      actions is not carried from stowrc into parsing of cli options.
    * It doesn't seem to make sense to put these options in stowrc
      anyway.
2019-06-25 19:38:25 +01:00
automake remove automake files 2015-02-07 19:30:26 +00:00
bin Parse cli and stowrc files separately 2019-06-25 19:38:25 +01:00
doc Synchronise --verbose documentation 2019-06-25 17:41:17 +01:00
docker whitespace cleanups 2016-11-20 22:20:46 +00:00
lib Fix old descriptions of Stow (#22) 2019-06-25 16:52:33 +01:00
t Add test for conflicting stowrc and cli args 2019-06-25 19:38:25 +01:00
.gitignore ignore cover_db generated by Coveralls 2016-11-20 22:57:39 +00:00
.travis.yml add coveralls 2015-11-17 01:43:38 +00:00
aclocal.m4 update aclocal.m4 using aclocal 1.15.1 2018-02-11 11:52:56 +00:00
AUTHORS Add a missing space. 2011-12-03 17:09:48 +00:00
build-docker.sh tag Docker images with the corresponding version number 2016-11-20 22:50:22 +00:00
Build.PL Parse cli and stowrc files separately 2019-06-25 19:38:25 +01:00
configure.ac Bump version to 2.3.0 2016-11-20 22:57:39 +00:00
COPYING Grafted root commit from savannah git master: 2011-11-16 14:04:03 +00:00
default-ignore-list default-ignore-list: ignore top-level README.*, LICENSE.*, and COPYING 2013-04-12 17:42:14 +01:00
INSTALL.md INSTALL.md: document how to build from git (#20) 2017-03-19 21:12:46 +00:00
Makefile.am fix naming of man page 2016-09-20 18:33:07 +01:00
MANIFEST Add test harness for stowrc files 2019-06-25 19:38:25 +01:00
MANIFEST.SKIP Add docker files for local testing. 2016-05-18 17:31:04 -05:00
META.json Parse cli and stowrc files separately 2019-06-25 19:38:25 +01:00
META.yml Parse cli and stowrc files separately 2019-06-25 19:38:25 +01:00
NEWS Group news items for 2.3.0 2019-06-25 19:36:49 +01:00
README.md Fix old descriptions of Stow (#22) 2019-06-25 16:52:33 +01:00
test-docker.sh tag Docker images with the corresponding version number 2016-11-20 22:50:22 +00:00
THANKS Update NEWS and THANKS according to recent commits 2019-06-25 17:41:17 +01:00
TODO add TODO for install-hooks 2013-04-24 08:46:52 +01:00

Build Status Coverage Status

README for GNU Stow

This README describes GNU Stow. This is not the definitive documentation for Stow; for that, see the info manual.

Stow is a symlink farm manager program which takes distinct sets of software and/or data located in separate directories on the filesystem, and makes them all appear to be installed in a single directory tree.

Originally Stow was born to address the need to administer, upgrade, install, and remove files in independent software packages without confusing them with other files sharing the same file system space. For instance, many years ago it used to be common to compile programs such as Perl and Emacs from source and install them in /usr/local. By using Stow, /usr/local/bin could contain symlinks to files within /usr/local/stow/emacs/bin, /usr/local/stow/perl/bin etc., and likewise recursively for any other subdirectories such as .../share, .../man, and so on.

While this is useful for keeping track of system-wide and per-user installations of software built from source, in more recent times software packages are often managed by more sophisticated package management software such as rpm, dpkg, and Nix / GNU Guix, or language-native package managers such as Ruby's gem, Python's pip, Javascript's npm, and so on.

However Stow is still used not only for software package management, but also for other purposes, such as facilitating a more controlled approach to management of configuration files in the user's home directory, especially when coupled with version control systems.

Stow was inspired by Carnegie Mellon's Depot program, but is substantially simpler and safer. Whereas Depot required database files to keep things in sync, Stow stores no extra state between runs, so there's no danger (as there was in Depot) of mangling directories when file hierarchies don't match the database. Also unlike Depot, Stow will never delete any files, directories, or links that appear in a Stow directory (e.g., /usr/local/stow/emacs), so it's always possible to rebuild the target tree (e.g., /usr/local).

Stow is implemented as a combination of a Perl script providing a CLI interface, and a backend Perl module which does most of the work.

You can get the latest information about Stow from the home page:

http://www.gnu.org/software/stow/

License

Stow is free software, licensed under the GNU General Public License, which can be found in the file COPYING.

Installation

See INSTALL.md for installation instructions.

Feedback

Please do send comments, questions, and constructive criticism. The mailing lists and any other communication channels are detailed on the above home page.

Brief history

Stow was inspired by Carnegie Mellon's "Depot" program, but is substantially simpler. Whereas Depot requires database files to keep things in sync, Stow stores no extra state between runs, so there's no danger (as there is in Depot) of mangling directories when file hierarchies don't match the database. Also unlike Depot, Stow will never delete any files, directories, or links that appear in a Stow directory (e.g., /usr/local/stow/emacs), so it's always possible to rebuild the target tree (e.g., /usr/local).