diff options
author | tobigun <tobigun@b956fd51-792f-4845-bead-9b4dfca2ff2c> | 2010-06-11 22:46:31 +0000 |
---|---|---|
committer | tobigun <tobigun@b956fd51-792f-4845-bead-9b4dfca2ff2c> | 2010-06-11 22:46:31 +0000 |
commit | b623e6de7f51f81d9a1b892d47323346d7ea56b1 (patch) | |
tree | dbc5b64678c98d4c7dcb85d65c38c925b08218b4 /game/languages | |
parent | 770c41a3d9aa23283c1e7eb2545f17d64df7a087 (diff) | |
download | usdx-b623e6de7f51f81d9a1b892d47323346d7ea56b1.tar.gz usdx-b623e6de7f51f81d9a1b892d47323346d7ea56b1.tar.xz usdx-b623e6de7f51f81d9a1b892d47323346d7ea56b1.zip |
handles a filename as command-line parameter to update a single files only
git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@2495 b956fd51-792f-4845-bead-9b4dfca2ff2c
Diffstat (limited to '')
-rwxr-xr-x | game/languages/update.py | 24 |
1 files changed, 14 insertions, 10 deletions
diff --git a/game/languages/update.py b/game/languages/update.py index f488b9d9..74b4b774 100755 --- a/game/languages/update.py +++ b/game/languages/update.py @@ -123,14 +123,18 @@ def update(lang): f.write(line + os.linesep) f.close() -# update ini-files -iniList=os.listdir(".") -for ini in iniList: - if not re.search(".ini$", ini): - continue - if ini == "English.ini": - continue - update(ini); +if len(sys.argv) >= 2: + # update specific language file passed as command-line argument + update(sys.argv[1]) +else: + # update all language (ini) files + iniList=os.listdir(".") + for ini in iniList: + if not re.search(".ini$", ini): + continue + if ini == "English.ini": + continue + update(ini); -# update template (do not use an .ini prefix as USDX would load it) -update("Language.new"); + # update template (do not use an .ini prefix as USDX would load it) + update("Language.new"); |