From 82f59f31ceef20a262846fc1912de86b9d2df677 Mon Sep 17 00:00:00 2001 From: Mike Burns Date: Fri, 30 May 2014 16:53:57 +0200 Subject: 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. --- bin/mkrc.in | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'bin/mkrc.in') 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 -- cgit v1.2.3