| Commit message (Collapse) | Author | Age |
|
|
|
|
|
|
| |
Run the hooks in alphabetical order so that people can more predictably
manage their hooks.
While here, clean up the NEWS.md.in.
|
| |
|
|
|
|
|
|
|
| |
Some formatting and more explanatory text. Frost was missing from the
rcm(7) credits. While here, bump the version number.
Honestly I just had these edits sitting around, unsure for how long.
|
|
|
|
|
|
|
|
|
|
|
| |
This adds the `-U` option to lsrc(1), rcup(1), and rcdn(1) commands; its
argument is an exclusion pattern. Any file matching this pattern is
symlinked without the leading dot.
There is also a `-u` option to undo a `-U`. The `UNDOTTED` setting in
rcrc(5) can be used to set it permanently.
The mkrc(1) command has `-U` and `-u` flags. They take no argument.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This commit adds a `-g` flag to rcup(1) to generate a standalone shell
script. This shell script can then be run again, even on different
computers, to recreate the symlinks.
This allows people to recreate the "download my dotfiles and run
./install.sh" instructions, but with generated code that they do not
need to maintain.
This provides us more freedom with lsrc(1): since rcm can be used to
generate a universal shell script, lsrc(1) now can be harder to install
-- it can depend on a compiler, for example -- because you only need to
install it on one machine.
The generated script is rather limited; this can be improved in future
commits, as desired.
|
|
|
|
|
|
|
|
| |
This adds a `-s` that can be used to override the `SYMLINK_DIRS` config,
or the `-S` flag, to lsrc(1), mkrc(1), rcup(1), and rcdn(1).
The `-s` flag is the opposite of -S: any argument, if it is a directory,
is not symlinked but instead recurred down.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
New flags have accumulated without proper care for the usage
instructions or man pages.
I manually went through each program and verified its usage instruction
against its `getopts`, then I alphabeticalized the usage message.
Based on the usage message, I then verified the synposis in the manpage.
Then, based on the synposis, I alphabeticalized the detailed listing of
the arguments and filled in the missing pieces. The `-h` and `-V`
arguments were missing from all manpages.
In the future we will need to be more careful about this. It would be
good to automate a checker that refuses to build unless the docs have
all the flags mentioned.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Based on issue #82, we now provide `-B` to override the hostname. In
particular:
- `mkrc -B foo` will enable `-o` but with the hostname set up `foo`.
- `lsrc -B foo` will work like normal `lsrc` except it treats `host-foo`
as the host-specific directory.
- `rcup -B foo` will run a normal `rcup` except `host-foo` is the
host-specific directory.
- `rcdn -B foo` is just like normal `rcdn`, but with `host-foo` as the
host-specific directory.
The `HOSTNAME` can also be set in the rcrc(5), and this is overridden by
the aforementioned `-B`.
While making this change: The `test/Makefile.am` used a mix of tabs and
spaces. Since it's a Makefile, replace it all with tabs.
|
|
|
|
|
|
|
|
| |
* Make sure `rcm` is mentioned in every `.Nd`, so that it will appear in
whatis(1).
* Every `.Bl -tag` must have a `-width`.
* Put the sections in a consistent order, as defined my mandoc.
* A `.Sh` should not be followed by a `.Pp`.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Typically a directory structure is copied instead of symlinked, while
files are symlinked. However, some cases require symlinked dirs: git
submodules, vim plugins, and so on.
This introduces a `SYMLINK_DIRS` option for rcrc(5) that takes a
space-separated list of "exclude patterns". Any directory matching these
patterns is symlinked.
This also introduces a `-S` argument for lsrc(1), rcup(1), and rcdn(1).
This argument takes a pattern, for one-off directory symlinking. It can
be repeated.
This also introduces `-S` and `-s` for mkrc(1). `-S` will re-install the
files as symlinks, and `-s` will not.
This does work with `-C`, though perhaps unintuitively - we don't know
what the user means in this case. However, it will not crash.
Bug: `-s` does not work right if `SYMLINK_DIRS` is set. Bug #36
addresses this.
|
|
|
|
|
| |
If the `pre-up` or `post-up` files are actually directories, run the
executable contents of them in an arbitrary order.
|
|
|
|
|
|
|
|
|
| |
* 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).
|
|
|
|
|
| |
The hooks can be skipped using `-K`, if needed and they can be forced
with the `-k` flag.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Some files prefer to be copies instead of symlinks---for example,
OpenSSH ignores symlinks. Add the `-C` option to mkrc(1) and rcup(1) to
handle this.
mkrc -C .ssh
rcup -C ssh
This does raise a synchronization problem that I do not yet know how to
solve; namely, what to do when the rc file changes. Perhaps a `rcsync`
command is in order; perhaps `rcup` should handle this; perhaps `rcsync`
is a better name for `rcup`.
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add the `-f` and `-i` options to rcup(1). `-f` will overwrite any file
it doesn't recognize; `-i` will prompt each time, and is the default.
For example:
rm ~/.zshrc
touch ~/.zshrc
rcup -f # overwrite that .zshrc with the symlink
rcup -i # prompt whether to overwrite that .zshrc
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This program will remove all your rc files that are symlinked. This can
be further controlled by `-d` and `-t`.
For example, you can feel comfortable trying new rc files because you
can quickly remove them again with `-d`.
rcup -d thoughtbot-dotfiles
rcdn -d thoughtbot-dotfiles
Likewise, when you're done with Python just drop it:
rcdn -t python
|
|
|
|
|
|
|
|
|
|
|
|
| |
Thanks to Rebecca Meritz (@rmeritz) for feedback on rcm(7), I have
restructured it and re-written the quick start section. Much of the
details about the sync algorithm have moved into rcup(1).
The new rcm(7) covers a quick start for those with existing directories,
including caveats for `install` scripts, dotted filenames, and
non-~/.dotfiles directory names; a quick start for those without
anything; and motivating sections for "advanced" features like tags,
host-specific files, and multiple directories.
|
|
|
|
|
|
| |
Convert all the manpages to mdoc. This gives us access to the mdoc suite
of tools, which includes HTML conversion, plus mdoc is a more
expressable and natural format in general.
|
|
The `man` and `share` directories in this project had an unnecessarily
deeply nested structure. Flatten it.
|