|
|
|
@ -37,10 +37,12 @@ class ShellModule(object):
|
|
|
|
|
return path.endswith('/')
|
|
|
|
|
|
|
|
|
|
def chmod(self, mode, path):
|
|
|
|
|
path = os.path.expanduser(path)
|
|
|
|
|
path = pipes.quote(path)
|
|
|
|
|
return 'chmod %s %s' % (mode, path)
|
|
|
|
|
|
|
|
|
|
def remove(self, path, recurse=False):
|
|
|
|
|
path = os.path.expanduser(path)
|
|
|
|
|
path = pipes.quote(path)
|
|
|
|
|
if recurse:
|
|
|
|
|
return "rm -rf %s >/dev/null 2>&1" % path
|
|
|
|
@ -60,6 +62,7 @@ class ShellModule(object):
|
|
|
|
|
return cmd
|
|
|
|
|
|
|
|
|
|
def checksum(self, path, python_interp):
|
|
|
|
|
path = os.path.expanduser(path)
|
|
|
|
|
path = pipes.quote(path)
|
|
|
|
|
# The following test needs to be SH-compliant. BASH-isms will
|
|
|
|
|
# not work if /bin/sh points to a non-BASH shell.
|
|
|
|
|