summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xbin/mkrc.in4
-rw-r--r--test/mkrc-simple-output.t13
2 files changed, 15 insertions, 2 deletions
diff --git a/bin/mkrc.in b/bin/mkrc.in
index e173eae..e8d3864 100755
--- a/bin/mkrc.in
+++ b/bin/mkrc.in
@@ -79,8 +79,8 @@ fi
for file in $files; do
case "$file" in
- /*) break;;
- *) [ -e "$PWD/$file" ] && file="$PWD/$file"
+ /*) : ;;
+ *) [ -e "$PWD/$file" ] && file="$PWD/$file" ;;
esac
dotless="$(de_dot "$file")"
dest="$(destination "$DOTFILES_DIR" "$dotless" $in_host "$tag")"
diff --git a/test/mkrc-simple-output.t b/test/mkrc-simple-output.t
index c18886c..9db263d 100644
--- a/test/mkrc-simple-output.t
+++ b/test/mkrc-simple-output.t
@@ -47,9 +47,22 @@ preserving the full path then symlink
> cd .nested/deeply
$ mkrc -v another_example
+ > cd ../..
Moving...
'*/.nested/deeply/another_example' -> '*/.dotfiles/nested/deeply/another_example' (glob)
Linking...
'*/.dotfiles/nested/deeply/another_example' -> '*/.nested/deeply/another_example' (glob)
$ assert_linked "$HOME/.nested/deeply/another_example" "$HOME/.dotfiles/nested/deeply/another_example"
+
+Making an absolute rc file
+
+ $ touch .an_example
+
+ $ mkrc -v $PWD/.an_example
+ Moving...
+ '*/.an_example' -> '*/.dotfiles/an_example' (glob)
+ Linking...
+ '*/.dotfiles/an_example' -> '*/.an_example' (glob)
+
+ $ assert_linked "$HOME/.an_example" "$HOME/.dotfiles/an_example"