[game-data-packager] 01/01: refresh fake lgogdownloader for v2.26-1

Alexandre Detiste detiste-guest at moszumanska.debian.org
Mon Oct 26 08:46:50 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 3e8b70e4bf364d98a712a2cd28c7770ab6297a04
Author: Alexandre Detiste <alexandre.detiste at gmail.com>
Date:   Mon Oct 26 09:45:58 2015 +0100

    refresh fake lgogdownloader for v2.26-1
---
 tools/fake_lgog.py | 16 +++++++++++-----
 1 file changed, 11 insertions(+), 5 deletions(-)

diff --git a/tools/fake_lgog.py b/tools/fake_lgog.py
index 8beaf6c..8cfd9fb 100755
--- a/tools/fake_lgog.py
+++ b/tools/fake_lgog.py
@@ -20,6 +20,8 @@
 import argparse
 import subprocess
 
+print('FAKE LGOGDOWNLOADER:')
+
 parser = argparse.ArgumentParser(prog='lgogdownloader',
             description='Fake lgogdownloader.')
 parser.add_argument('--download', action='store_true')
@@ -27,7 +29,7 @@ parser.add_argument('--no-extra', action='store_true')
 parser.add_argument('--directory', metavar='DIR')
 parser.add_argument('--subdir-game', type=str)
 parser.add_argument('--platform', type=str)
-parser.add_argument('--platform-priority', type=str)
+parser.add_argument('--include', type=str)
 parser.add_argument('--language', type=str)
 parser.add_argument('--game', type=str)
 args = parser.parse_args()
@@ -47,17 +49,21 @@ archives = {
           #'rise_of_the_triad__dark_war#en': ['gog_rise_of_the_triad_dark_war_2.0.0.8.sh'],
           'the_feeble_files#en': ['setup_the_feeble_files_2.0.0.5.exe',
                                   'setup_the_feeble_files_2.0.0.5-1.bin',
-                                  'setup_the_feeble_files_2.0.0.5-2.bin']
+                                  'setup_the_feeble_files_2.0.0.5-2.bin'],
+          'toonstruck#en': ['gog_toonstruck_2.0.0.4.sh'],
           }.get(game + '#' + (args.language or 'en'))
 
 if archives is None:
-    exit('FAKE LGOGDOWNLOADER: Unknown game %s' % game)
+    exit('Unknown game %s' % game)
 
 for archive in archives:
-    locate = subprocess.check_output(['locate', '-e', archive], universal_newlines=True)
+    try:
+        locate = subprocess.check_output(['locate', '-e', archive], universal_newlines=True)
+    except subprocess.CalledProcessError:
+        exit('Archive %s not found in "locate" database' % archive)
     for file in locate.splitlines():
         if file.endswith(archive):
            break
     else:
-        exit('FAKE LGOGDOWNLOADER: archive %s not found in "locate" database' % archive)
+        exit('Archive %s not found in "locate" database' % archive)
     subprocess.check_call(['ln', '-s', '-v', file, args.directory])

-- 
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