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): ...@@ -9,6 +9,10 @@ if sys.version_info[:2] < (2,2):
print "Sorry, rdiff-backup requires version 2.2 or later of python" print "Sorry, rdiff-backup requires version 2.2 or later of python"
sys.exit(1) 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", setup(name="rdiff-backup",
version=version_string, version=version_string,
...@@ -19,24 +23,25 @@ setup(name="rdiff-backup", ...@@ -19,24 +23,25 @@ setup(name="rdiff-backup",
packages = ['rdiff_backup'], packages = ['rdiff_backup'],
ext_modules=[Extension("rdiff_backup.C", ["cmodule.c"])]) ext_modules=[Extension("rdiff_backup.C", ["cmodule.c"])])
install = 0 copy_files = 0
prefix = "/usr" prefix = "/usr"
for arg in sys.argv[1:]: # check for "install" and --prefix arg for arg in sys.argv[1:]: # check for "install" and --prefix= arg
if arg == "install": install = 1 if arg == "install": copy_files = 1
elif arg.startswith("--prefix="): elif arg.startswith("--prefix="): prefix = arg[len("--prefix="):]
prefix = arg[len("--prefix="):]
if copy_files:
if install: bindir = prefix + "/bin"
print "Copying rdiff-backup to %s/bin" % prefix print "Copying rdiff-backup to " + bindir
assert not os.system("install -D -m0755 rdiff-backup " install("-d " + bindir)
"%s/bin/rdiff-backup" % prefix) install("-m0755 rdiff-backup " + bindir)
print "Copying rdiff-backup.1 to %s/share/man/man1" % prefix
assert not os.system("install -D -m0644 rdiff-backup.1 " mandir = prefix + "/share/man/man1"
"%s/share/man/man1/rdiff-backup" % prefix) print "Copying rdiff-backup.1 to " + mandir
print ("Copying CHANGELOG, COPYING, README, and FAQ.html to " install("-d " + mandir)
"%s/share/doc/rdiff-backup-%s" % (prefix, version_string)) install("-m0644 rdiff-backup.1 " + mandir)
assert not os.system("install -d %s/share/doc/rdiff-backup-%s" %
(prefix, version_string)) docdir = "%s/share/doc/rdiff-backup-%s" % (prefix, version_string)
assert not os.system("install -m0644 CHANGELOG COPYING README FAQ.html " print ("Copying CHANGELOG, COPYING, README, and FAQ.html to " + docdir)
"%s/share/doc/rdiff-backup-%s" % install("-d " + docdir)
(prefix, version_string)) 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