summaryrefslogtreecommitdiff
path: root/man
Commit message (Collapse)AuthorAge
* Fix shell globbing bugsGravatar Edd Salkield2020-04-03
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There are several problems leading to the unintentional globbing issue: Firstly, within `rcup` and `rcdn`, when constructing arguments to pass to `lsrc`, the _for_ loops over the arguments do not have quoted variables, leading to globbing. I have quoted these accordingly. Secondly, `lsrc` is invoked as follows: ```sh dests_and_srcs="$(lsrc $LS_ARGS)" ``` When shells use command substitution like this, they go through two stages: - Word expansion. This is useful because it splits `LS_ARGS` back up into its constituent strings. - File name expansion. The side effect of this is to introduce globbing. You can read more about how this works [here](https://www.tldp.org/LDP/Bash-Beginners-Guide/html/sect_03_04.html#sect_03_04_07). To fix this, I have passed `lsrc` and its arguments to `eval`. This involves quoting the relevant arguments, so: ```sh for dotfiles_dir in "$DOTFILES_DIRS"; do LS_ARGS="$LS_ARGS -d $dotfiles_dir" done ``` becomes ```sh for dotfiles_dir in "$DOTFILES_DIRS"; do LS_ARGS="$LS_ARGS -d \"$dotfiles_dir\"" done ``` Then `lsrc` is invoked as follows: ```sh dests_and_srcs="$(eval "lsrc $LS_ARGS")" ``` There is one final non-globbing issue: the parsing of arguments can introduce extra spaces in the variables, which then trip up the `dotfiles_dir_excludes` function. For example: ```sh I) includes="$includes $OPTARG";; ``` introduces a space if `includes` is empty or null. I have introduced the function `append_variable`, which allows two variables to be appended without introducing unnecessary whitespace. Then the additional whitespace is never added in the first place. Fixes #256.
* Update rcm.7.mustacheGravatar Alan Yee2017-10-27
| | | Replace OS X with macOS
* Update lsrc.1Gravatar Alan Yee2017-10-27
| | | Replace OS X with macOS
* Document missing tilde expansionGravatar Mike Burns2017-10-27
| | | | | | | The `COPY_ALWAYS`, `EXCLUDES`, `SYMLINK_DIRS`, and `UNDOTTED` variables in rcrc(5) can contain globs. We want to expand `~` and e.g. `~dmr` but not `*`; therefore, we cannot perform tilde expansion within those variables.
* Fix relative exclude globsGravatar Mike Burns and Eric Collins2016-12-26
| | | | | | | Pass the dotfiles subdir along with the file to `is_excluded` so that we can match against it. Preserve single-file compatibility by looping twice.
* Run hooks in a defined orderGravatar David Alexander2016-11-12
| | | | | | | Run the hooks in alphabetical order so that people can more predictably manage their hooks. While here, clean up the NEWS.md.in.
* Correct inter-step references in man/rcup.1Gravatar Nick Novitski2015-11-26
|
* Non-recursive MakefileGravatar Mike Burns2015-11-07
| | | | | Instead of a complex graph, process everything from one Makefile. Simplify, simplify.
* Fix faulty flag in the `rcdn` man pageGravatar Teo Ljungberg2015-10-08
| | | | | There is no `-e` flag available, and `-x` is the flag that is used for specifying an exclusion pattern.
* Typo: the -> thatGravatar Vlad GURDIGA2015-06-29
|
* Documentation editing and improvementsGravatar Mike Burns2015-04-08
| | | | | | | 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.
* Improve explanation of DOTFILES_DIRS optionGravatar Jason Daniel Augustine Gilliland2015-01-05
| | | | | The explanation in the man page was vague as to what "canonical source" meant.
* Add a release scriptGravatar Mike Burns2014-12-19
| | | | | | | | | The Makefiles were mostly filled with a complex shell script written in m4sh. Moving that out into a separate script helps debugging and compatibility, and in general makes life better. This also improved the DEVELOPERS.md documentation to be more clear about the steps of a release, including third-party packages.
* Add rcup example of adding new rc filesGravatar Melissa Xie2014-12-02
| | | | | | | It wasn't obvious that you could also use rcup with undotted files to add them as new rc files. There was also a typo.
* Support rc files without leading dotsGravatar Christopher Koch2014-11-19
| | | | | | | | | | | 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.
* Fix typo in rcm man pageGravatar Scott Stevenson2014-11-07
| | | | The word "directory" was duplicated.
* Generate an installation scriptGravatar Mike Burns2014-08-26
| | | | | | | | | | | | | | | | | | 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.
* rcdn(1) -K -kGravatar Mike Burns2014-07-22
| | | | | | | | | The rcdn(1) program is all set up to handle the `-K` and `-k` flags, except those flags were never actually allowed through `getopts`. Thanks to Mikkel Fahnøe Jørgensen for discovering this. Closes #93.
* Allow the user to override SYMLINK_DIRS with -sGravatar Mike Burns2014-07-09
| | | | | | | | 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.
* Update documentation on usageGravatar Mike Burns2014-05-09
| | | | | | | | | | | | | | | | | 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.
* Document the wild hostname(1) issue on OS XGravatar Mike Burns2014-05-09
| | | | | | | | | | | | | | As described in #82, the hostname on OS X can vary: - The result of hostname(1) can change depending on DHCP settings; by default, as you move between networks, your hostname will change. - The value for `ComputerName` as set in scutil(8) contains values that are inappropriate for a directory name (spaces, quotes, and so on), and is blank by default. - The value for `LocalHostName` changes based on DNS and DHCP settings. Therefore, OS X users are highly encouraged to set a hostname using the `HOSTNAME` variable in rcrc(5).
* Add a hostname overrideGravatar Mike Burns2014-05-07
| | | | | | | | | | | | | | | | | | | 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.
* Generate the list of contributors from gitGravatar Mike Burns2014-03-20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Instead of requiring contributors to update rcm(7), pull the list of contributors from the git log instead. The `rcm.7` file has been moved to `rcm.7.mustache`. The `autogen.sh` command will write `rcm.7` using autocontrib, a quick script included in this commit. This commit adds a `.mailmap` file, used by git-shortlog(1) to produce correct and useful names and email addresses. An initial `.mailmap` has been added to correct some existing email addresses and duplications. `.mailmap` is documented in [Documentation/mailmap.txt][mailmap] for git. This adds a maintainer dependency on Ruby and the mustache gem. The autocontrib program is spiked out in Ruby due to my familarity with the language, but the choice of templating language (mustache) allows flexibility for switching languages later. This is a dependency requirement only for people who run `autogen.sh` -- maintainers. This adds a maintainer dependency on git. Again, this is only for maintainers, and many (all?) of them need git to get rcm's source anyway. Thanks to Patrick Brisbin and George Brocklehurst for the review. [mailmap]: https://github.com/git/git/blob/6a907786af835ac15962be53f1492f23e044f479/Documentation/mailmap.txt
* Fixed hooks not executing under CygwinGravatar Daniel Watson2014-03-19
|
* Add support for -v option on OpenBSDGravatar The Linux Kitten2014-03-19
| | | | | | | | | | The `-v` (verbose) flag for `cp`, `ln`, and `rm` is not standard. It is simple to implement using shell functions, so introduce `cp_v`, `ln_v`, and `rm_v`. These shell functions use the existing `$VERBOSE` variable for printing, which simplifies the code and reduces the number of variables. Fixes #61.
* Document that you must quote globsGravatar Mike Burns2014-03-10
| | | | | The shell likes to expand globs as conveniently as possible. Therefore, quote them when passing them to lsrc(1) and others (e.g. `-x '*vim*'`).
* Grab the ORIGIN_URL in man MakefileGravatar Mike Burns2014-03-07
| | | | This caused the push to fail because it couldn't find the repo URL.
* Last-minute changesv1.2.1Gravatar Mike Burns2014-03-07
| | | | | * Debian package has a -2 in its filename. Of course. * Build HTML docs in the top-level gh-pages directory.
* Manpage cleanupGravatar Mike Burns2014-03-07
| | | | | | | | * 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`.
* Document glob bugsGravatar Mike Burns2014-03-07
| | | | | | | | | | Until we can get a handle on globbing, we cannot close #11. That bug is the last remaining ticket blocking the 1.2.1 release. However, it may involve a larger modification than a patch release should. Documenting allows us to make the release while working on the bug for the next release. http://1389blog.com/pix/thats-a-feature-not-a-bug.jpg
* Add a list of contributors to rcm(7)Gravatar Mike Burns2014-02-28
| | | | | | | | | | | | | | This list is an alphabetical listing of everyone who has authored at least one commit, plus their email address. When the author is a coworker I have changed this to use their thoughtbot email address. This also updates the `AUTHORS` section to mention thoughtbot. The `NEWS.md.in` file has been changed to reflect that 1.2.0 is released. A `CONTRIBUTING.md` file has been added to explain what is required to send a good contribution.
* Start bringing in the Makefile.am from gitshGravatar Mike Burns2014-02-26
| | | | | | | | | | | It introduces the `Makefile.am` from gitsh, and abstracts it a bit. This `Makefile.am`, or most of it, could be dropped into gitsh again. How to use it is documented in `DEVELOPERS.md`. The whole release process is more consistent and simple: `make release` to build a tarball, Homebrew, Arch, Debian, HTML (from manpages), and tag it, pushed to the various repos, and with cleanup. The `release` target is composed of smaller targets that stack well.
* Add sigil (`$`) for symlinked dir for lsrc -FGravatar Pablo Olmos de Aguilera Corradini2014-02-24
| | | | | | | The `$` sigil in `-F` indicates that the directory is symlinked instead of recurred upon. Fixes #37.
* Force some directories to be symlinksGravatar Pablo Olmos de Aguilera Corradini and Mike Burns2014-02-18
| | | | | | | | | | | | | | | | | | | | | | | 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.
* Allow {pre,post}-up hook directoriesGravatar Pablo Olmos de Aguilera Corradini2014-02-07
| | | | | If the `pre-up` or `post-up` files are actually directories, run the executable contents of them in an arbitrary order.
* Fixed typoGravatar Jordan Eldredge2014-02-06
| | | Someone had dots on the brain
* Fix NEWS format, fix typoGravatar Mike Burns2014-02-03
| | | | | | | * The NEWS format was off: bullets must be preceded by two spaces. * The word 'committing' was misspelled; hats off to debbuild's linter for catching this.
* Fixed typo in rcm manpageGravatar Roberto Pedroso2014-01-27
|
* Prefer RCRC environment variable over ~/.rcrcGravatar patrick brisbin2013-12-11
| | | | | | | | | * 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).
* Add generated files to .gitignoreGravatar patrick brisbin2013-12-10
|
* Fix typo in rcm man pageGravatar Dan Croak2013-10-02
| | | | The word "multiple" was misspelled.
* Upgrade to automake 1.14Gravatar Mike Burns2013-09-14
| | | | | This is what FreeBSD has in its ports tree and is the latest as of 21 June 2013.
* 1.1 buld cruftGravatar Mike Burns2013-09-12
| | | | Running autogen.sh changes these files. Clearly they must be important.
* Add -kK for rcup and rcdnGravatar Mike Burns2013-08-16
| | | | | The hooks can be skipped using `-K`, if needed and they can be forced with the `-k` flag.
* Pre-up, post-up, pre-down, and post-down hooksGravatar Mike Burns2013-08-16
| | | | | | | | | | | | | | | | 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.
* Add the COPY_ALWAYS optionGravatar Mike Burns2013-08-11
| | | | | | | | | | | | | | | | | | | | 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.
* Change `-e` to `-x`Gravatar Mike Burns2013-08-11
| | | | | | 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.
* rcdn only removes symlinksGravatar Mike Burns2013-08-11
| | | | | | | | | | | | | | | | | | | Picture this case: % ls -l ~/.a ~/.a -> ~/.dotfiles/a % tree ~/.dotfiles/a a `-- b `-- c `-- d `-- foo Ideally we would want `~/.a/b/c/d/foo` to be the symlink, and the rest to be actual directories. However, some people did it differently. Running `rcdn` on the above would previously have removed `foo` from `~/.dotfiles`. Now, it removes `~/.a` and nothing more.
* Upgrade to automake 1.13.3 and autoconf 2.69Gravatar Mike Burns2013-08-11
| | | | This is what is in Debian testing.
* Add -C for copying filesGravatar Mike Burns2013-08-05
| | | | | | | | | | | | | | 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`.