Permalink
Browse files

Merge pull request #2 from atanation/master

Use of cuisine methods to create and check links
  • Loading branch information...
2 parents 485836f + 069e1f0 commit 0e68b1bd3c591759349e58e53070f86f558670a2 @atanation atanation committed Sep 5, 2012
Showing with 3 additions and 4 deletions.
  1. +3 −4 src/cuisine_sweet/ensure/fs.py
@@ -25,13 +25,12 @@ def dir_created(path, recursive=False, mode=None, owner=None, group=None):
@completed_ok(arg_output=[0,1])
-def dir_symlink_created(src, dest):
+def dir_symlink_created(src, dest, symbolic=True, mode=None, owner=None, group=None):
"""
Ensure that a symlink at `dest` pointing to `src` is created.
:param src: *required* str; path to the source real directory
:param dest: *required* str; path to the destination symlink
"""
- run('ln -s %s %s >& /dev/null; true' % (src, dest))
- run('test -L %s && test -d %s' % (dest, dest))
-
+ cuisine.file_link(src, dest, symbolic=symbolic, mode=mode, owner=owner, group=group)
+ cuisine.file_is_link(src)

0 comments on commit 0e68b1b

Please sign in to comment.