Making sure that the target directory exists and that it is
readable after rsync. ssh_cmd added to simplify the call, but is
currently limited to commands with two arguments plus directory.
Can be generalized. subroutine call used to not need to add extra
dependencies at this point.
if retcode:
print 'Error: '+' '.join(cmd)+' Returncode ['+str(retcode)+']'
if retcode:
print 'Error: '+' '.join(cmd)+' Returncode ['+str(retcode)+']'
+def ssh_cmd(target, command):
+ t = target.split(":")
+ c = command.split()
+ cmd = ["ssh",t[0],c[0],c[1],t[1]]
+ retcode = subprocess.call(cmd)
+ if retcode:
+ print 'Error: '+' '.join(cmd)+' Returncode ['+str(retcode)+']'
PREFIXES={u'db': u'http://docbook.org/ns/docbook',
u'xi': u'http://www.w3.org/2001/XInclude',
PREFIXES={u'db': u'http://docbook.org/ns/docbook',
u'xi': u'http://www.w3.org/2001/XInclude',
return html
def publish(self):
return html
def publish(self):
+ ssh_cmd(args.output,"mkdir -p")
publish(tmptarget, args.output)
publish(tmptarget, args.output)
- publish(args.style+"css", args.output)
- publish(args.style+"images",args.output)
+ for res in ["css","images","js","favicon.ico"]:
+ if (os.path.exists(args.style+res)):
+ publish(args.style+res, args.output)
+ ssh_cmd(args.output,"chmod a+rx"
ts = time.time()
dir_ = Directory()
ts = time.time()
dir_ = Directory()