factorio-dl: use a better jq(1) syntax
We now use jq(1) itself to filter out null values.
factorio-dl: remove unnecessary tests
factorio-dl: always check that FACTORIO_TARGET is valid, before trying to download it
factorio-dl: sort -V, not sort -n
Not POSIX, but on FreeBSD, OpenBSD, macOS, GNU and probably WSL.
factorio-dl: check for the dependencies
README.md: update according to the recent 0.2.0 changes
factorio-dl: always use the token + drop support for FACTORIODL_CONFIG
We want a token
1. Look for token + username in player-data.json
2. If not available, resort to LOGIN+PASSWORD to get a token from
3. If still not available, abort
With this token, we can safely remove any use we had of cookies
With this new logic, jq(1) becomes a mandatory dependency
Rework the help text
factorio-dl: improve the help text
factorio-dl: rely on an unofficial update API instead of the main website for version grabbing
xmllint(1) is no longer necessary
jq(1) is now necessary
factorio-dl: add support for no version, and for version aliases
We may now use 'experimental', 'stable' or nothing at all as a version to
We rely on the factorio homepage to achieve this. It is probably not optimal,
and it will break if Wube Software ever so slightly reorganizes the factorio
factorio-dl: don't overwrite some env variables if they exist
factorio-dl: change logic for setting output file name.
* Read options
* If no option is set, use a default value
Should be more readable?...
factorio-dl: read without -r will mangle backslashes.
README.md: update documentation
* Example with pass(1)
* Update findings about DLAGENTS+=
factorio-dl: clear error message when <version> is not supplied
factorio-dl: we now support interactions for typing the password
factorio-dl: add a test before invoking `mv(1)` as `makepkg(1)` threw a warning.
Introduce README.md; lighten the help text in the script
factorio-dl: fix the `-t` switch
The script would always download the linux64 file. Oops @ bc6ae05
factorio-dl: cleanup in case we get interrupted (trap)