diff options
author | bescoto <bescoto@2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109> | 2003-08-09 00:04:52 +0000 |
---|---|---|
committer | bescoto <bescoto@2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109> | 2003-08-09 00:04:52 +0000 |
commit | 34559924454c77f75a348bc6dae8e5b94fa5d54e (patch) | |
tree | 5bcf2d2af8af6ed01049a93289260891369dc61c | |
parent | d20a76a29c8f11e2800a1f529f3a3883aa16b23d (diff) | |
download | rdiff-backup-34559924454c77f75a348bc6dae8e5b94fa5d54e.tar.gz |
Bugfixes, symlink to OLD
git-svn-id: http://svn.savannah.nongnu.org/svn/rdiff-backup/trunk@390 2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109
-rwxr-xr-x | rdiff-backup/dist/makeweb | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/rdiff-backup/dist/makeweb b/rdiff-backup/dist/makeweb index 33f97d9..5298172 100755 --- a/rdiff-backup/dist/makeweb +++ b/rdiff-backup/dist/makeweb @@ -4,7 +4,8 @@ import sys, os def RunCommand(cmd, ignore_error = 0): print cmd - assert not os.system(cmd) + if ignore_error: os.system(cmd) + else: assert not os.system(cmd) webprefix = "/home/ben/misc/html/mirror/rdiff-backup/" @@ -22,15 +23,18 @@ RunCommand("cp FAQ.wml CHANGELOG %s" % webprefix) if sys.argv[1:]: - RunCommand("mkdir OLD/%s" % (version,), ignore_error = 1) + RunCommand("mkdir %s/OLD/%s" % (webprefix, version), ignore_error = 1) RunCommand("cp rdiff-backup-%s.tar.gz rdiff-backup-%s*rpm %s/OLD/%s" % (version, version, webprefix, version)) os.chdir(webprefix) print "cd ", webprefix if sys.argv[1:]: for filename in os.listdir('OLD/' + version): - os.symlink('OLD/%s/%s' % (version, filename), filename) - RunCommand("rm latest latest.rpm latest.tar.gz") + try: os.lstat(filename) + except OSError: pass + else: os.remove(filename) + os.symlink('OLD/%s/%s' % (version, filename), filename) + RunCommand("rm latest latest.src.rpm latest.tar.gz", ignore_error = 1) RunCommand("ln -s rdiff-backup-%s-*src.rpm latest.src.rpm" % (version,)) os.symlink("rdiff-backup-%s.tar.gz" % (version,), 'latest.tar.gz') os.symlink('OLD/%s' % (version,), 'latest') |