rien / reStream

Stream your reMarkable screen over SSH.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Implement a better installation/update flow

rien opened this issue · comments

commented

Installing restream.rs by scp'ing it to the reMarkable is not user-friendly and prone to errors. This also requires the prebuilt binary to be present in the repository, which is not really clean.

We could ask the user on first use (when restream.rs is not found) to install the binary for them by wgeting the latest release from GitHub, or - if toltec is installed - install it with toltec.

This can easily be expanded to an update flow, updating the binary when the script is updated.

commented

Moreover, Installation section suggests indirectly to use the main branch, which, I think, is for develop purpose, instead of download the latest release or use the branch release-.

commented

Correct, the new instructions should instruct users to download the latest reStream.sh bundled with the release.

commented

A version variable in reStream.sh should be created. To get the version of restream binary, restream --version works already.
One should check that the version of the two files is the same and eventually get an error.

Ideally, a package manager updates reStream.sh, and a --install downloads the right binary on the remarkable.
To implement --install, the ways described in the README.md should work, but:

  • toltec adds an extra dependency, is useless for users who use one or few unofficial tools and needs internet connection on remarkable.
  • direct downloading needs internet connection on remarkable.
  • downloading on the host requires on it wget (however it's widespread) and moving scp (deprecated) or better sftp (both included with openSSH).
commented

A version variable in reStream.sh should be created. To get the version of restream binary, restream --version works already.
One should check that the version of the two files is the same and eventually get an error.

Instead of only throwing an error, it would be a bit more user-friendly by suggesting to perform the instalation/update automatically, but only if the user explicitly allows this.

Ideally, a package manager updates reStream.sh, and a --install downloads the right binary on the remarkable.
To implement --install, the ways described in the README.md should work, but:

  • toltec adds an extra dependency, is useless for users who use one or few unofficial tools and needs internet connection on remarkable.

If toltec is available on the reMarkable, we should use it. If not, we can fall back to manual methods.

  • direct downloading needs internet connection on remarkable.

This can be skipped.

  • downloading on the host requires on it wget (however it's widespread) and moving scp (deprecated) or better sftp (both included with openSSH).

curling the binary trough ssh should also work, and curl is even more widespread than wget I think.

commented

Instead of only throwing an error, it would be a bit more user-friendly by suggesting to perform the instalation/update automatically, but only if the user explicitly allows this.

Not a fan of automatic updates. But suggestions are definitely a good idea.

If toltec is available on the reMarkable, we should use it. If not, we can fall back to manual methods.

Ok. I was worried about management of version. How does toltec do it?
Moreover, we currently add all \home\root and \opt\bin to PATH

restream_rs="PATH=\"\$PATH:/opt/bin/:.\" restream $restream_options"

In installation process, shouldn't be safer to store restream in eg \home\root and if using toltec create a symlink in it? In this way we do not need to change PATH variable.

curling the binary trough ssh should also work, and curl is even more widespread than wget I think.

If you prefer.