Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement a better installation/update flow #50

Open
rien opened this issue Jan 28, 2021 · 5 comments
Open

Implement a better installation/update flow #50

rien opened this issue Jan 28, 2021 · 5 comments

Comments

@rien
Copy link
Owner

rien commented Jan 28, 2021

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.

@f3fora
Copy link
Contributor

f3fora commented Jan 29, 2021

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

@rien
Copy link
Owner Author

rien commented Jan 29, 2021

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

@f3fora
Copy link
Contributor

f3fora commented Jan 31, 2021

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

@rien
Copy link
Owner Author

rien commented Jan 31, 2021

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.

@f3fora
Copy link
Contributor

f3fora commented Jan 31, 2021

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants