Commit 4076aba8 authored by ben's avatar ben

Final changes for 0.9.1 (fixed prefix code)


git-svn-id: http://svn.savannah.nongnu.org/svn/rdiff-backup@140 2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109
parent cd5e166a
......@@ -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)
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment