projects
/
treecutter.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
2eecae6
)
rsync also removes target files that should not be there.
author
Fredrik Unger
<fred@tree.se>
Mon, 28 Mar 2011 07:26:19 +0000
(09:26 +0200)
committer
Fredrik Unger
<fred@tree.se>
Mon, 28 Mar 2011 07:26:19 +0000
(09:26 +0200)
src/tree-cutter.py
patch
|
blob
|
history
diff --git
a/src/tree-cutter.py
b/src/tree-cutter.py
index 37ee80134b4a90f6a2ca3646479eff84e2faf170..2a8e6106dc930b2eabf3a635e1ad65216385a339 100755
(executable)
--- a/
src/tree-cutter.py
+++ b/
src/tree-cutter.py
@@
-36,7
+36,7
@@
def mkdir_p(path):
else: raise
def publish(src,target):
else: raise
def publish(src,target):
- cmd = ["rsync","-a",src,target]
+ cmd = ["rsync","-a",
"--delete",
src,target]
retcode = subprocess.call(cmd)
if retcode:
print 'Error: '+' '.join(cmd)+' Returncode ['+str(retcode)+']'
retcode = subprocess.call(cmd)
if retcode:
print 'Error: '+' '.join(cmd)+' Returncode ['+str(retcode)+']'
@@
-51,6
+51,7
@@
def generateSitemap():
sitemap.append(dict(link=f))
except IOError, what_error:
print 'Sitemap missing - generating one.'
sitemap.append(dict(link=f))
except IOError, what_error:
print 'Sitemap missing - generating one.'
+
for dirname, dirnames, filenames in os.walk('.'):
for filename in filenames:
if fnmatch.fnmatch(filename, '*.xml'):
for dirname, dirnames, filenames in os.walk('.'):
for filename in filenames:
if fnmatch.fnmatch(filename, '*.xml'):