diff options
author | Mike Burns <mike@mike-burns.com> | 2013-08-11 17:29:01 +0200 |
---|---|---|
committer | Mike Burns <mike@mike-burns.com> | 2013-08-11 21:18:53 +0200 |
commit | 8d7f6c94a3458328b339b6582592b6c1fecec950 (patch) | |
tree | ff9ea4a2a83fafb910d0c604435d648bf01cedbf /share | |
parent | 0fbc27dbe296e03b4001586a7e29780328cbc657 (diff) |
Add the COPY_ALWAYS option
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.
Diffstat (limited to 'share')
-rw-r--r-- | share/rcm.sh.in | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/share/rcm.sh.in b/share/rcm.sh.in index 186f3a2..ea35e47 100644 --- a/share/rcm.sh.in +++ b/share/rcm.sh.in @@ -10,6 +10,7 @@ ERROR=echo_error VERBOSE=: MKDIR=mkdir LN="ln -s" +CP=cp RM=rm DEFAULT_DOTFILES_DIR=$HOME/.dotfiles MV=mv @@ -61,6 +62,7 @@ handle_common_flags() { MV="$MV -v" RM="$RM -v" LN="$LN -v" + CP="$CP -v" INSTALL="$INSTALL -vv" elif [ $verbosity -eq 1 ]; then DEBUG=: @@ -69,6 +71,7 @@ handle_common_flags() { MV="$MV -v" RM="$RM -v" LN="$LN -v" + CP="$CP -v" INSTALL="$INSTALL -v" elif [ $verbosity -eq 0 ]; then DEBUG=: @@ -77,6 +80,7 @@ handle_common_flags() { MV="$MV -v" RM="$RM -v" LN="$LN -v" + CP="$CP -v" else DEBUG=: VERBOSE=: |