summaryrefslogtreecommitdiff
path: root/bin/mkrc
diff options
context:
space:
mode:
Diffstat (limited to 'bin/mkrc')
-rwxr-xr-xbin/mkrc14
1 files changed, 12 insertions, 2 deletions
diff --git a/bin/mkrc b/bin/mkrc
index c78d10b..f44cadb 100755
--- a/bin/mkrc
+++ b/bin/mkrc
@@ -40,8 +40,9 @@ verbosity=0
in_host=0
version=0
always_copy=0
+force_symlink=0
-while getopts ChVvqot:d: opt; do
+while getopts ChSsVvqot:d: opt; do
case "$opt" in
C) always_copy=1 ;;
h) show_help ;;
@@ -51,6 +52,8 @@ while getopts ChVvqot:d: opt; do
o) in_host=1 ;;
d) DOTFILES_DIR=$OPTARG ;;
V) version=1 ;;
+ S) force_symlink=1 ;;
+ s) force_symlink=0 ;;
esac
done
shift $(($OPTIND-1))
@@ -67,8 +70,15 @@ fi
files=$@
+if [ $force_symlink -eq 1 ]; then
+ for file in $files; do
+ dedotted=`de_dot $file`
+ INSTALL="$INSTALL -S $dedotted"
+ done
+fi
+
for file in $files; do
- dotless=`echo $file | sed -e "s|$DEST_DIR/||" | sed -e 's/^\.//'`
+ dotless=`de_dot $file`
dest=`destination $DOTFILES_DIR $dotless $in_host $tag`
mkdir -p $dest/`dirname $dotless`
$PRINT "Moving..."