Expand Dotfile syntax support to not require a <source> argument

Supported action syntax:

- `<action>: <source> -> <target>`
- `<action>: -> <target>`
- `<source> -> <target>`
- `-> <target>`
This commit is contained in:
2014-03-08 13:29:07 +00:00
parent 8fa09ea3c3
commit e0f0177301
3 changed files with 35 additions and 3 deletions

View File

@@ -39,6 +39,15 @@ dotify-action link ackrc .ackrc
dotify-action link gitconfig \".gitconfig\""
# Compiles standard actions without a <source>
echo -e "root_link .dotfiles
link: -> .ackrc
link:-> \".gitconfig\"" > $dotfile
assert "compile-dotfile $dotfile" "root_link .dotfiles
dotify-action link .ackrc
dotify-action link \".gitconfig\""
# Compiles default (shorthand) actions
echo -e "root_link .dotfiles
link: ackrc -> .ackrc
@@ -48,6 +57,15 @@ dotify-action link ackrc .ackrc
dotify-action default gitconfig \".gitconfig\""
# Compiles default (shorthand) actions without a <source>
echo -e "root_link .dotfiles
-> .ackrc
-> \".gitconfig\"" > $dotfile
assert "compile-dotfile $dotfile" "root_link .dotfiles
dotify-action default .ackrc
dotify-action default \".gitconfig\""
# Correctly indents actions
echo -e "root_link .dotfiles
if [ true ]; then