#!/usr/bin/python
-from __future__ import print_function
+#from __future__ import print_function
import os
import subprocess
import errno
else: raise
def publish(src,target):
- cmd = ["rsync","-a","--delete","--partial",src,target]
+ cmd = ["rsync","-a","--copy-links","--partial",src,target]
retcode = subprocess.call(cmd)
if retcode:
error('%s : retruncode %s' % (' '.join(cmd),str(retcode)))
def get_folder_size(folder):
total_size = os.path.getsize(folder)
+ if os.path.isfile(folder):
+ return total_size
for item in os.listdir(folder):
itempath = os.path.join(folder, item)
if os.path.isfile(itempath):
total_size += get_folder_size(itempath)
return total_size
-def warning(*objs):
- print("WARNING: ", *objs, file=sys.stderr)
+#proc = subprocess.Popen(args, env={'PATH': os.getenv('PATH')})
+def translate(files):
+ for f in files:
+ out = subprocess.check_output(["translate.sh", f])
+ sys.stdout.write('#')
-def error(*objs):
- print("ERROR: ", *objs, file=sys.stderr)
+#def warning(*objs):
+# print("WARNING: ", *objs, file=sys.stderr)
+
+#def error(*objs):
+# print("ERROR: ", *objs, file=sys.stderr)