The International Simutrans Forum

 

Author Topic: Allow specifying an output path to 'get_lang_files.sh'  (Read 1510 times)

0 Members and 1 Guest are viewing this topic.

Offline R1dO

  • *
  • Posts: 42
  • Languages: NL EN
Allow specifying an output path to 'get_lang_files.sh'
« on: July 27, 2019, 06:55:11 PM »
I recently had some more fun with the "get_lang_files" script.
The adaptions made allow for downloading the translations into an arbitrary path. This could be useful for scripted updates when you have multiple versions of simutrans installed, for instance a repository version (when compiling bleeding edge) and a stable release version.

With this version the following arguments are accepted:
Code: [Select]
./get_lang_files                     # Default original behavior, e.g. downloading relative  to the script file.
./get_lang_files --help             # Basic usage help text
./get_lang_files 'arbitrary path'   # Tell the script where the files should be dropped (can be absolute and relative)

Please note that the default behavior is still the same as before as to not break usage in the release version.

Hope this is of any help to anyone.

P.s. had to add .txt to the name in order for the forum to accept the attachment

Offline Ters

  • Coder/patcher
  • Devotee
  • *
  • Posts: 5543
  • Languages: EN, NO
Re: Allow specifying an output path to 'get_lang_files.sh'
« Reply #1 on: July 28, 2019, 07:51:35 AM »
Wouldn't it be easier or just as easy to just call get_lang_files in each installed Simutrans directory? That would also be more future-proof, in case the different versions of Simutrans suddenly require different sets of files.

Offline R1dO

  • *
  • Posts: 42
  • Languages: NL EN
Re: Allow specifying an output path to 'get_lang_files.sh'
« Reply #2 on: July 28, 2019, 06:04:20 PM »
That certainly is also an option.
As to whether it is easier, you first have to manually copy get_lang_files to the appropriate folder since it seems to only exist in the root of the source repository [1].
Both version should be equally future proof for your case (when copied into the root of a simutrans installation), care was taken not to change existing behavior.

Guess it comes down to user preference, this change gives them another option.

[1] When writing the previous post I was under the impression the file was included in the release downloads, checking the 120-4* downloads it appears to be missing, hence my assumption was wrong.

Offline makie de

  • *
  • Posts: 96
    • Homepage PAK128-German
  • Languages: DE
Re: Allow specifying an output path to 'get_lang_files.sh'
« Reply #3 on: July 28, 2019, 07:10:21 PM »
this run in the nightly builds and once before the release