summaryrefslogtreecommitdiff
path: root/share/rcm.sh.in
diff options
context:
space:
mode:
authorGravatar Mike Burns <mike@mike-burns.com>2013-08-01 16:06:30 -0400
committerGravatar Mike Burns <mike@mike-burns.com>2013-08-02 17:51:02 -0400
commit9e16a4aea0dad1909abc78b3f9bc1291917486db (patch)
treee8dfdebb79370c0b46aab71d805621f6fe5ee34c /share/rcm.sh.in
parentfe3244ca9c8c9a38ea700851e36667b1015d11e6 (diff)
Add `mkrc -o` to install host-specific files
To make it easier to manage host-specific rc files, `mkrc` now supports a `-o` option. This causes the specified file to be added to the host section named for the current machine. This option is in conflict with the `-t` option.
Diffstat (limited to 'share/rcm.sh.in')
-rw-r--r--share/rcm.sh.in8
1 files changed, 8 insertions, 0 deletions
diff --git a/share/rcm.sh.in b/share/rcm.sh.in
index c057e87..3b8b87b 100644
--- a/share/rcm.sh.in
+++ b/share/rcm.sh.in
@@ -6,6 +6,7 @@ DEBUG=:
DEST_DIR=$HOME
PRINT=echo
PROMPT=echo_n
+ERROR=echo_error
VERBOSE=:
MKDIR=mkdir
LN=ln
@@ -20,6 +21,13 @@ echo_n() {
printf "%s " "$*"
}
+echo_error() {
+ local exit_status=$1
+ shift
+ echo $* >&2
+ exit $exit_status
+}
+
version() {
cat << EOV
$1 (rcm) $VERSION