summaryrefslogtreecommitdiff
path: root/man
diff options
context:
space:
mode:
authorGravatar Mike Burns <mike@mike-burns.com>2014-05-05 11:08:02 +0200
committerGravatar Mike Burns <mike@mike-burns.com>2014-05-07 10:43:12 +0200
commit8c26bfec32441830b4a0e5938a6cc7de1a64ff99 (patch)
tree5b22c7195b76f67a79fe4bd763f02faa5bd20e39 /man
parentc9d180900a3f8e54b456c9e71bfaac930bbc2478 (diff)
Add a hostname override
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.
Diffstat (limited to 'man')
-rw-r--r--man/lsrc.16
-rw-r--r--man/mkrc.14
-rw-r--r--man/rcdn.15
-rw-r--r--man/rcm.7.mustache7
-rw-r--r--man/rcrc.57
-rw-r--r--man/rcup.15
6 files changed, 34 insertions, 0 deletions
diff --git a/man/lsrc.1 b/man/lsrc.1
index 22920f4..a0d096c 100644
--- a/man/lsrc.1
+++ b/man/lsrc.1
@@ -12,6 +12,7 @@
.Op Fl t Ar tag
.Op Fl x Ar excl_pat
.Op Fl N Ar excl_pat
+.Op Fl B Ar hostname
.Op files ...
.Sh DESCRIPTION
This program lists all configuration files, both the sources in the
@@ -26,6 +27,11 @@ section, for details on the directory layout.
It supports these options:
.
.Bl -tag -width "-I excl_pat"
+.It Fl B Ar HOSTNAME
+treat
+.Pa host-HOSTNAME
+as the host-specific directory instead of computing it based on the
+computer's hostname
.It Fl d Ar DIR
list dotfiles from the DIR. This can be specified multiple times.
.
diff --git a/man/mkrc.1 b/man/mkrc.1
index 4e274bf..3101839 100644
--- a/man/mkrc.1
+++ b/man/mkrc.1
@@ -9,6 +9,7 @@
.Op Fl Cvqo
.Op Fl t Ar tag
.Op Fl d Ar dir
+.Op Fl B Ar hostname
.Ar files ...
.Sh DESCRIPTION
This program adds files to your dotfiles directory then installs it
@@ -18,6 +19,9 @@ different source directory.
It supports these options:
.
.Bl -tag -width "-d DIR"
+.It Fl B Ar HOSTNAME
+use the supplied hostname instead of computing one. Implies
+.Fl o .
.It Fl C
copy instead of symlinking when installing the rc file back into your
home directory
diff --git a/man/rcdn.1 b/man/rcdn.1
index fa0b60b..b7f7554 100644
--- a/man/rcdn.1
+++ b/man/rcdn.1
@@ -7,6 +7,7 @@
.Sh SYNOPSIS
.Nm rcdn
.Op Fl kKvq
+.Op Fl B Ar hostname
.Op Fl d Ar dir
.Op Fl I Ar excl_pat
.Op Fl t Ar tag
@@ -43,6 +44,10 @@ These hooks are run each time
is run and therefore must be idempotent.
.
.Bl -tag -width "-I EXCL_PAT"
+.It Fl B Ar HOSTNAME
+treat
+.Pa host-HOSTNAME
+as the host-specific directory instead of computing it
.It Fl d Ar DIR
remove rc files from the
.Ar DIR .
diff --git a/man/rcm.7.mustache b/man/rcm.7.mustache
index 8956e5d..36dec50 100644
--- a/man/rcm.7.mustache
+++ b/man/rcm.7.mustache
@@ -213,6 +213,13 @@ dotfile directories listed in there are often specific to a single
machine.
.Pp
.Dl mkrc -o .rcrc
+.Pp
+If your hostname is difficult to compute, or you otherwise want to use a
+different hostname, you can use the
+.Fl B
+flag.
+.Pp
+.Dl mkrc -B eggplant .rcrc
.
.Sh RATIONALE
The rcm suite was built as an abstraction over the shell, Ruby, Python,
diff --git a/man/rcrc.5 b/man/rcrc.5
index 3872795..bc72329 100644
--- a/man/rcrc.5
+++ b/man/rcrc.5
@@ -44,6 +44,12 @@ explained in detail in
under the section
.Sx EXCLUDE PATTERN .
.
+.It Va HOSTNAME
+the hostname for this computer. This is normally computed using the
+.Xr hostname 1
+command, but this command is non-standard and can prove unreliable. The
+.Va HOSTNAME
+variable forces a known hostname.
.It Va TAGS
the default tags.
.
@@ -62,6 +68,7 @@ under the section
.Dl COPY_ALWAYS="*"
.Dl DOTFILES_DIRS="/home/mike/.dotfiles /usr/share/dotfiles"
.Dl EXCLUDES="irbrc *:*emacs* dotfiles:python*"
+.Dl HOSTNAME="eggplant"
.Dl TAGS="freebsd development email git laptop gmail notmuch"
.Dl SYMLINK_DIRS="zprezto"
.Sh SEE ALSO
diff --git a/man/rcup.1 b/man/rcup.1
index 60e36ae..b487987 100644
--- a/man/rcup.1
+++ b/man/rcup.1
@@ -7,6 +7,7 @@
.Sh SYNOPSIS
.Nm rcup
.Op Fl CfikKqv
+.Op Fl B Ar hostname
.Op Fl d Ar dir
.Op Fl I Ar excl_pat
.Op Fl t Ar tag
@@ -25,6 +26,10 @@ for details on the directory layout.
.Pp
It supports these options:
.Bl -tag -width "-x EXCL_PAT"
+.It Fl B Ar HOSTNAME
+treat
+.Pa host-HOSTNAME
+as the host-specific directory instead of computing it
.It Fl C
copy the files instead of symlinking them
.It Fl d Ar DIR