[game-data-packager] 01/01: look for paths in .residualvmrc

Alexandre Detiste detiste-guest at moszumanska.debian.org
Sat Oct 17 22:04:02 UTC 2015


This is an automated email from the git hooks/post-receive script.

detiste-guest pushed a commit to branch master
in repository game-data-packager.

commit 4933841e8b5687ba0584541b4817f403ae7effc3
Author: Alexandre Detiste <alexandre.detiste at gmail.com>
Date:   Sun Oct 18 00:03:26 2015 +0200

    look for paths in .residualvmrc
---
 game_data_packager/games/residualvm_common.py | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

diff --git a/game_data_packager/games/residualvm_common.py b/game_data_packager/games/residualvm_common.py
index 868a708..76ee03c 100644
--- a/game_data_packager/games/residualvm_common.py
+++ b/game_data_packager/games/residualvm_common.py
@@ -51,6 +51,22 @@ class ResidualvmGameData(GameData):
         return ResidualvmTask(self, **kwargs)
 
 class ResidualvmTask(PackagingTask):
+    def iter_extra_paths(self, packages):
+        super(ResidualvmTask, self).iter_extra_paths(packages)
+
+        rcfile = os.path.expanduser('~/.residualvmrc')
+        if not os.path.isfile(rcfile):
+            return
+
+        config = configparser.ConfigParser()
+        config.read(rcfile, encoding='utf-8')
+        for section in config.sections():
+            if section.startswith(self.game.gameid):
+                if 'path' not in config[section]:
+                    continue
+                path = config[section]['path']
+                if os.path.isdir(path):
+                    yield path
 
     def fill_extra_files(self, package, destdir):
         super(ResidualvmTask, self).fill_extra_files(package, destdir)

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-games/game-data-packager.git



More information about the Pkg-games-commits mailing list