summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorGravatar Pablo Olmos de Aguilera Corradini <pablo@glatelier.org>2013-09-01 16:20:04 -0400
committerGravatar Mike Burns <mike@mike-burns.com>2013-10-08 10:27:58 +0200
commit205c45d730a241dd4c24b01472b0e47f581ddfc2 (patch)
treefd5bfe4e3f289642b3f345c88dfef009139ea318 /bin
parent48bb122e1bd95d29b3ce993093e138aea475ce46 (diff)
Show a difference between moving and link in mkrc
I found that after you add a file with `mkrc` command from any dir, the output looks like: $ mkrc ~/.my-awesome-dot-file ‘$HOME/.my-awesome-dot-file -> ‘$HOME/.dotfiles/my-awesome-dot-file' ‘$HOME/.my-awesome-dot-file -> ‘$HOME/.dotfiles/my-awesome-dot-file' $ It looks like the output it's appearing twice, which could led you believe something went wrong or the output is a bit buggy. Obivously, it's not, and the command ran without problems. Use `$PRINT` to show which step it is on before the verbose messages are displayed.
Diffstat (limited to 'bin')
-rwxr-xr-xbin/mkrc2
1 files changed, 2 insertions, 0 deletions
diff --git a/bin/mkrc b/bin/mkrc
index 113c079..9bd9fba 100755
--- a/bin/mkrc
+++ b/bin/mkrc
@@ -75,6 +75,8 @@ for file in $files; do
dotless=`echo $file | sed -e "s|$DEST_DIR/||" | sed -e 's/^\.//'`
dest=`destination $DOTFILES_DIR $dotless $in_host $tag`
mkdir -p $dest/`dirname $dotless`
+ $PRINT "Moving..."
$MV $file $dest/$dotless
+ $PRINT "Linking..."
$INSTALL -d $DOTFILES_DIR -t ${tag:--} $dotless
done