| Commit message (Collapse) | Author | Age |
|
|
|
|
|
|
|
|
| |
* Centralize configuration loading in rcm.sh(.in)
* Check for readability, not just existence
Add RCRC notes to all manpages. Putting the environment variables in a
table lines them up more neatly and definitively, across all output
formats, and also follows the examples used by e.g. BSD ls(1).
|
|
|
|
| |
Quick usage summaries for the four commands.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
These are programs that, if they exist, will run before or after the
syncronization/removal is run. Three use cases caused this:
1. The thoughtbot dotfiles will run a vundle installation set of
commands after intitial synchronization.
2. I changed the location of `.bash_history` to `.bash/history` and
wanted to move `.bash_history` to `.bash/history` after up to preserve
existing history.
3. Moving from an existing old-style custom install script to `rcup`
might require some cleanup; this happened in practice, and required a
simple script.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The suite now honors the `COPY_ALWAYS` option in rcrc(5). This can be
set to a space-separated list of file globs. Any file matching a glob is
copied instead of symlinked. This is handy both for secure programs
(`netrc`, `ssh/id_*`) and for programs that oddly re-write files
(`weechat/*`).
To always copy everything, use the `*` glob.
This is reflected throughout the suite as follows:
* lsrc now has a `-F` option which shows a symbol to indicate whether it
is a symlink (`@`) or a copy (`X`).
* rcdn only removes symlinks unless the file under question matches a
`COPY_ALWAYS` glob, in which case it is removed regardless of whether
it is a symlink.
* rcup will copy instead of symlinking any file that matches any
`COPY_ALWAYS` glob.
|
|
|
|
|
|
| |
Since the `-e` flag was for exclude patterns, and since it's rare for a
word with an `x` to come along, change the `-e` flag to `-x`. Better to
do it now before a new release.
|
|
|
|
|
|
|
|
|
|
|
| |
The `-I` flag serves as an "undo" for the `-e` pattern. It overrides any
matching exclusions, allowing for temporary
listing/installation/removal.
For example, if you want to try a `.pythonrc` but leave it in your
`EXCLUDES` in rcrc(5), you can do:
rcup -Ipythonrc pythonrc
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The lsrc(1), rcup(1), and rcdn(1) commands now take any number of `-e`
flags, used to specify an exclusion pattern. This can also be controlled
via rcrc(5), the `EXCLUDES` variable.
An exclusion pattern specifies a file glob to skip. In the case of
lsrc(1), any file matching the glob is not listed; in rcup(1) it is not
symlinked; and in rcdn(1) it is not removed.
The file glob can be preceded by the name of a dotfiles directory
(separated from the file glob by a colon) to increase the specificity.
Useful for:
rcdn -e rcrc
rcup -d work-dotfiles -e bashrc
rcup -d ~/.dotfiles -d wife-dotfiles -d sys-dotfiles -e wife-dotfiles:tigrc
|
|
|
|
|
|
|
|
|
| |
Due to the awesome refactoring in
fe3244ca9c8c9a38ea700851e36667b1015d11e6, the `-t` and `-d` options were
broken. Fix it by removing the `handle_metadata_flags` function and
inlining the code again, and build the `LS_ARGS` argument differently.
Clearly I need a test suite.
|
|
|
|
|
|
| |
Pull the `-V`, `-v`, `-q`, `-t`, and `-d` out into the
`handle_common_flags` and `handle_metadata_flags` functions, shared
between the different programs.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The `lsrc` command (and thus the other commands, too) now supports
passing a relative directory name to `-d`. Previously, this caused only
the non-host and non-tag directories to run; now all dotfiles
directories are run for all metafiles, too.
As an example, this now works correctly:
lsrc -d dotfiles
This still works, too:
lsrc -d /home/mike/dotfiles
|
|
|
|
|
|
| |
The `/usr/local/libexec` standard looks awkward on Debian, so after
careful and sad evaluation we've concluded that we do not, in fact,
execute the `rcm.sh` library. Move it to `/usr/local/share` instead.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
With multiple source directories it is possible to have duplicates.
Consider these source directories, `a` and `b`:
|-- a
| |-- bar
| `-- foo
`-- b
|-- baz
`-- foo
The goal is to have this:
.bar -> a/bar
.baz -> b/baz
.foo -> a/foo
Note the duplcate `foo` file.
We now handle this, in `lsrc` and therefore in `rcup`. We do this by
storing a `:`-separated string of destination files (e.g. `.foo`) and
`grep`ing that string before we operate on any destination.
|
|
|
|
|
|
|
|
|
|
| |
Originally my installation script was a Ruby rake task, so I had to
ignore the `Rakefile` when installing.
Then I moved onto `install`, written on a trans-Atlantic flight, so I
had to ignore that too.
Now, ignore neither of these.
|
|
The `lsrc` command works just like the `rcup` command but instead of
making symlinks and directories, it just lists all the files that would
be symlinks. It prints the destination (e.g. `~/.foo`) and the source
(`~/.dotfiles/foo`), separated by a colon.
Re-write `rcup` in terms of `lsrc`.
|