run("if [ -d data.bak ];then mv data.bak data;fi;")
sudo('....')
sudo('')
I am using fabric deploy for my web project. I want to fin开发者_JAVA百科d a way that will stop the rest of the execution of the command, if it doesn't find the data.bak directory. Any way to achieve this in fabric?
There is a contribute api in fabric.contrib.files
import.
精彩评论