diff options
author | Mike Burns <mike@mike-burns.com> | 2014-08-12 13:28:04 +0200 |
---|---|---|
committer | Mike Burns <mike@mike-burns.com> | 2014-08-26 16:58:46 +0200 |
commit | df29698f530357f9419cb72e70a808f93235e915 (patch) | |
tree | 60df5953ee7dc0fa454f87b69bbef7b6e732dd6c /man/rcm.7.mustache | |
parent | 8465d6a8d3568537f15688c66bc136a137e9c005 (diff) |
Generate an installation script
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.
Diffstat (limited to 'man/rcm.7.mustache')
-rw-r--r-- | man/rcm.7.mustache | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/man/rcm.7.mustache b/man/rcm.7.mustache index c9da706..8c8abd4 100644 --- a/man/rcm.7.mustache +++ b/man/rcm.7.mustache @@ -225,6 +225,33 @@ OS X users should see the .Sx BUGS section for more details. . +.Sh STANDALONE INSTALLATION SCRIPT +. +The +.Xr rcup 1 +tool can be used to generate a portable shell script. +Instead of running a command such as +.Xr ln 1 +or +.Xr rm 1 , +it will print the command to +.Li stdout . +This is controlled with the +.Fl g +flag. +Note that this will generate a script to create an exact replica of the +synchronization, including tags, host-specific files, and dotfiles directories. +.Pp +.Dl env RCRC=/dev/null rcup -B 0 -g > install.sh +.Pp +Using the above command, you can now run +.Li install.sh +to install (or re-install) your rc files. +The +.Li install.sh +script can be stored in your dotfiles directory, copied between computers, and +so on. +. .Sh RATIONALE The rcm suite was built as an abstraction over the shell, Ruby, Python, and make scripts people were writing and sharing. It is intended to run |