summaryrefslogtreecommitdiff
path: root/rdiff-backup/dist/makedist
diff options
context:
space:
mode:
authorben <ben@2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109>2002-03-21 09:04:46 +0000
committerben <ben@2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109>2002-03-21 09:04:46 +0000
commit2d27d685f5fdd3ea26ab0c74a5f3ff8b5f5bb156 (patch)
tree09851ee604778c3658885c5f1615996cde677d63 /rdiff-backup/dist/makedist
parentbdb7257a57d3f9c9037fd44190eabbea105cf0ee (diff)
downloadrdiff-backup-2d27d685f5fdd3ea26ab0c74a5f3ff8b5f5bb156.tar.gz
A few fixes to accomodate the new CVS system
git-svn-id: http://svn.savannah.nongnu.org/svn/rdiff-backup/trunk@18 2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109
Diffstat (limited to 'rdiff-backup/dist/makedist')
-rwxr-xr-xrdiff-backup/dist/makedist15
1 files changed, 12 insertions, 3 deletions
diff --git a/rdiff-backup/dist/makedist b/rdiff-backup/dist/makedist
index 162126b..8a57ed2 100755
--- a/rdiff-backup/dist/makedist
+++ b/rdiff-backup/dist/makedist
@@ -2,8 +2,10 @@
import os, re, shutil, time
-filelist = ["rdiff-backup", "CHANGELOG", "COPYING", "README", "FAQ.html"]
SourceDir = "src"
+filelist = [SourceDir + "/rdiff-backup", "CHANGELOG",
+ "COPYING", "README", "FAQ.html"]
+
# Various details about the files must also be specified by the rpm
# spec template.
@@ -12,7 +14,7 @@ spec_template = "dist/rdiff-backup.spec"
def GetVersion():
"""Return version string by reading in ./rdiff-backup"""
- fp = open(SourceDir + "rdiff-backup", "r")
+ fp = open(SourceDir + "/rdiff-backup", "r")
match = re.search("Version (.*?) ", fp.read())
fp.close()
return match.group(1)
@@ -35,8 +37,12 @@ def MakeTar(version):
"""Create rdiff-backup tar file"""
tardir = "rdiff-backup-%s" % version
tarfile = "rdiff-backup-%s.tar.gz" % version
+ try:
+ os.lstat(tardir)
+ os.system("rm -rf " + tardir)
+ except OSError: pass
os.mkdir(tardir)
- for file in filelist: shutil.copyfile(file, os.path.join(tardir, file))
+ for file in filelist: os.system("cp -a %s %s" % (file, tardir))
os.chmod(os.path.join(tardir, "rdiff-backup"), 0755)
CopyMan(os.path.join(tardir, "rdiff-backup.1"), version)
os.system("tar -cvzf %s %s" % (tarfile, tardir))
@@ -55,7 +61,10 @@ def MakeSpecFile(version):
return specfile
def Main():
+ cwd = os.getcwd()
+ os.chdir(SourceDir)
assert not os.system("./Make")
+ os.chdir(cwd)
version = GetVersion()
print "Processing version " + version
tarfile = MakeTar(version)