The previous handling had two problems:
- current dir only appended if argc == 1
- multiple args passed as one to reader.lua
As a result:
- `bin/koreader -v -d` doesn't work (reader.lua sees it as one arg)
- `bin/koreader -d abc.epub` doesn't work either (for the same reason)
The fix is to go through args one by one and use `set -- …` to keep them
as an array of args (preserves white-space and avoid unintended
expansions that might happen if we attempted to do some eval trickery
instead).
Note that reader.lua doesn't currently handle multiple file/dir args, so
we could instead just look at the last arg and add pwd to that one.
Unfortunately doing this in POSIX sh isn't any simpler than processing
all args. :-)
(While at it, use `$PWD` which is required by POSIX to always be
present.)
Tested with bash 5.3.9, busybox 1.37.0 and dash 0.5.12.
Cf. koreader/kobase#2298.
The `linux` update target now build an AppImage too.
Other miscellaneous changes:
- AppImage:
* better icons
* update filename to conform to spec (`ApplicationName-$VERSION-$ARCH.AppImage`)
* running from extracted contents will behave like the Linux distribution (multi-user mode)
- Debian package:
* better icons
* update version to include git commit
* drop fakeroot requirement for building
* fix dependencies (based on our targeted Ubuntu LTS: 22.04, AKA Jammy)
- Linux distribution:
* better icons
* improved start-up script (can be symlinked to)
`# shellcheck disable=SC2039,SC3040` is only if you want it to pass multiple versions, but I figure there's not much reason to keep the old exception for <=0.7.1 in there.
* Unbreak OTA on crappy shells
Very, very old ash versions abort on set -o failures (as mandated by
POSIX, granted). This makes it impossible to reliably catch failures in
a single step.
So do it from the Lua side instead.
Should fix#5844
* Launch the zsync wrapper through bash on Cervantes
* Also remove the temporary files when doing a full retry
* Bump base
Pickup the required zsync2/FBInk updates
(https://github.com/koreader/koreader-base/pull/1038)
* Actually does what it says on the tin for Abort
i.e., cleanup temporary files
* On zsync delta failure, offer to retry OTA update with a full download
Fix#4429
* Bring the "this may take a while" popup back up before full DL
Don't rebuild the local tarball for a full dl, we're ignoring it anyway
;)
Co-Authored-By: NiLuJe <ninuje@gmail.com>