Skip to content

Instantly share code, notes, and snippets.

@kplimack
Last active August 29, 2015 14:14
Show Gist options
  • Save kplimack/c916d62f5868a20aa423 to your computer and use it in GitHub Desktop.
Save kplimack/c916d62f5868a20aa423 to your computer and use it in GitHub Desktop.
some_resource 'derp' do
only_if "test -d /derp/derp && -L /derp/derp" # is a dir and a symlink
only_if "test -d /derp/derp && ! -L /derp/derp" # is a dir and not a symlink
end
@medyagh
Copy link

medyagh commented Feb 3, 2015

[root@ip-172-31-20-244 /]# test -L /tools/
[root@ip-172-31-20-244 /]# echo $?
1
[root@ip-172-31-20-244 /]# test -L /tools
[root@ip-172-31-20-244 /]# echo $?
0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment