summaryrefslogtreecommitdiff
path: root/share/rcm.sh.in
diff options
context:
space:
mode:
authorGravatar Mike Burns <mike@mike-burns.com>2013-08-05 06:15:17 +0200
committerGravatar Mike Burns <mike@mike-burns.com>2013-08-05 06:15:17 +0200
commitfc648042ca2e753b8ecdabc5fa52aea5313c3b03 (patch)
treee69c2dba330066ef1ddc5725d97ab0b336ef5783 /share/rcm.sh.in
parent122bbf0c6da226fc7e8a7e2a8d173b3e6259f7cf (diff)
Add -C for copying files
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`.
Diffstat (limited to 'share/rcm.sh.in')
-rw-r--r--share/rcm.sh.in5
1 files changed, 4 insertions, 1 deletions
diff --git a/share/rcm.sh.in b/share/rcm.sh.in
index 6dae15b..186f3a2 100644
--- a/share/rcm.sh.in
+++ b/share/rcm.sh.in
@@ -9,7 +9,7 @@ PROMPT=echo_n
ERROR=echo_error
VERBOSE=:
MKDIR=mkdir
-LN=ln
+LN="ln -s"
RM=rm
DEFAULT_DOTFILES_DIR=$HOME/.dotfiles
MV=mv
@@ -60,6 +60,7 @@ handle_common_flags() {
PRINT=echo
MV="$MV -v"
RM="$RM -v"
+ LN="$LN -v"
INSTALL="$INSTALL -vv"
elif [ $verbosity -eq 1 ]; then
DEBUG=:
@@ -67,6 +68,7 @@ handle_common_flags() {
PRINT=echo
MV="$MV -v"
RM="$RM -v"
+ LN="$LN -v"
INSTALL="$INSTALL -v"
elif [ $verbosity -eq 0 ]; then
DEBUG=:
@@ -74,6 +76,7 @@ handle_common_flags() {
PRINT=echo
MV="$MV -v"
RM="$RM -v"
+ LN="$LN -v"
else
DEBUG=:
VERBOSE=: