diff options
author | Mike Burns <mike@mike-burns.com> | 2014-05-30 16:53:57 +0200 |
---|---|---|
committer | Mike Burns <mike@mike-burns.com> | 2014-07-09 11:10:04 +0200 |
commit | 82f59f31ceef20a262846fc1912de86b9d2df677 (patch) | |
tree | 1e1dc4154f767bc3cfa8fc18aee4aa3247cc88ed /bin/mkrc.in | |
parent | ff2aa079062c7471c39590abf33d3f38b0c4abc7 (diff) |
Allow the user to override SYMLINK_DIRS with -s
This adds a `-s` that can be used to override the `SYMLINK_DIRS` config,
or the `-S` flag, to lsrc(1), mkrc(1), rcup(1), and rcdn(1).
The `-s` flag is the opposite of -S: any argument, if it is a directory,
is not symlinked but instead recurred down.
Diffstat (limited to 'bin/mkrc.in')
-rwxr-xr-x | bin/mkrc.in | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/bin/mkrc.in b/bin/mkrc.in index 6545e55..55a7cd8 100755 --- a/bin/mkrc.in +++ b/bin/mkrc.in @@ -43,7 +43,7 @@ verbosity=0 in_host=0 version=0 always_copy=0 -force_symlink=0 +force_symlink=50 install_args= while getopts :ChSsVvqot:d:B: opt; do @@ -86,6 +86,11 @@ if [ $force_symlink -eq 1 ]; then dedotted="$(de_dot "$file")" INSTALL="$INSTALL -S $dedotted" done +elif [ $force_symlink -eq 0 ]; then + for file in $files; do + dedotted="$(de_dot "$file")" + INSTALL="$INSTALL -s $dedotted" + done fi for file in $files; do |