From ee40aec3d4e4a7e53863fea41ea38b572cfc2f08 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=2E=C3=87a=C4=9Flar=20Onur?= Date: Thu, 21 Jul 2005 23:06:16 +0000 Subject: [PATCH] =?UTF-8?q?less=20i=C3=A7in=202=20yeni=20fonk.,=20=C3=B6n?= =?UTF-8?q?=C3=BCm=C3=BCz=C3=BC=20g=C3=B6relim...?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pisi/actionsapi/pisitools.py | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/pisi/actionsapi/pisitools.py b/pisi/actionsapi/pisitools.py index c283575a..3623b7c2 100644 --- a/pisi/actionsapi/pisitools.py +++ b/pisi/actionsapi/pisitools.py @@ -118,6 +118,21 @@ def dodir(parameters = ''): makedirs(env.install_dir + parameters) +def newman(source, destination, srcDir = ''): + + man, postfix = destination.split('.') + destDir = os.path.join(env.install_dir, dirs.man, "man" + postfix) + + makedirs(destDir) + + if not srcDir: + file = os.path.join(env.work_dir, env.src_name + "-" + env.src_version, source) + else: + file = os.path.join(env.work_dir, srcDir, source) + + if os.access(file, os.F_OK): + copy_file(file, os.path.join(destDir, os.path.basename(destination))) + def remove(filename): unlink(env.install_dir + filename) @@ -125,3 +140,10 @@ def remove(filename): def removeDir(dirname): clean_dir(env.install_dir + dirname) + +def doecho(content, filename): + makedirs(env.install_dir + '/' + os.path.dirname(filename)) + + f = open(env.install_dir + '/' + filename, 'w') + f.write(content) + f.close()