News:

Simutrans.com Portal
Our Simutrans site. You can find everything about Simutrans from here.

Allow specifying an output path to 'get_lang_files.sh'

Started by R1dO, July 27, 2019, 06:55:11 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

R1dO

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:

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

Ters

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.

R1dO

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.

makie

this run in the nightly builds and once before the release