summaryrefslogtreecommitdiff
path: root/rdiff-backup/dist/setup.py
diff options
context:
space:
mode:
authorben <ben@2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109>2002-06-19 09:55:00 +0000
committerben <ben@2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109>2002-06-19 09:55:00 +0000
commitf75dba2fa023f9e18b6e89dd8a826009571b6c41 (patch)
tree101025d6513814f14cc8a12338c2bbf43b649ac9 /rdiff-backup/dist/setup.py
parentb108debb74980f900c61fec1370b6aae9db5f8aa (diff)
downloadrdiff-backup-f75dba2fa023f9e18b6e89dd8a826009571b6c41.tar.gz
Final changes for 0.9.1 (fixed prefix code)
git-svn-id: http://svn.savannah.nongnu.org/svn/rdiff-backup/trunk@140 2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109
Diffstat (limited to 'rdiff-backup/dist/setup.py')
-rwxr-xr-xrdiff-backup/dist/setup.py45
1 files changed, 25 insertions, 20 deletions
diff --git a/rdiff-backup/dist/setup.py b/rdiff-backup/dist/setup.py
index 49829bd..934e0a6 100755
--- a/rdiff-backup/dist/setup.py
+++ b/rdiff-backup/dist/setup.py
@@ -9,6 +9,10 @@ if sys.version_info[:2] < (2,2):
print "Sorry, rdiff-backup requires version 2.2 or later of python"
sys.exit(1)
+def install(cmd):
+ if os.system("install " + cmd) != 0:
+ print "Error running 'install %s'" % cmd
+ sys.exit(1)
setup(name="rdiff-backup",
version=version_string,
@@ -19,24 +23,25 @@ setup(name="rdiff-backup",
packages = ['rdiff_backup'],
ext_modules=[Extension("rdiff_backup.C", ["cmodule.c"])])
-install = 0
+copy_files = 0
prefix = "/usr"
-for arg in sys.argv[1:]: # check for "install" and --prefix arg
- if arg == "install": install = 1
- elif arg.startswith("--prefix="):
- prefix = arg[len("--prefix="):]
-
-if install:
- print "Copying rdiff-backup to %s/bin" % prefix
- assert not os.system("install -D -m0755 rdiff-backup "
- "%s/bin/rdiff-backup" % prefix)
- print "Copying rdiff-backup.1 to %s/share/man/man1" % prefix
- assert not os.system("install -D -m0644 rdiff-backup.1 "
- "%s/share/man/man1/rdiff-backup" % prefix)
- print ("Copying CHANGELOG, COPYING, README, and FAQ.html to "
- "%s/share/doc/rdiff-backup-%s" % (prefix, version_string))
- assert not os.system("install -d %s/share/doc/rdiff-backup-%s" %
- (prefix, version_string))
- assert not os.system("install -m0644 CHANGELOG COPYING README FAQ.html "
- "%s/share/doc/rdiff-backup-%s" %
- (prefix, version_string))
+for arg in sys.argv[1:]: # check for "install" and --prefix= arg
+ if arg == "install": copy_files = 1
+ elif arg.startswith("--prefix="): prefix = arg[len("--prefix="):]
+
+if copy_files:
+ bindir = prefix + "/bin"
+ print "Copying rdiff-backup to " + bindir
+ install("-d " + bindir)
+ install("-m0755 rdiff-backup " + bindir)
+
+ mandir = prefix + "/share/man/man1"
+ print "Copying rdiff-backup.1 to " + mandir
+ install("-d " + mandir)
+ install("-m0644 rdiff-backup.1 " + mandir)
+
+ docdir = "%s/share/doc/rdiff-backup-%s" % (prefix, version_string)
+ print ("Copying CHANGELOG, COPYING, README, and FAQ.html to " + docdir)
+ install("-d " + docdir)
+ install("-m0644 CHANGELOG COPYING README FAQ.html " + docdir)
+