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

feature: add check for a newer version of this script from within script #15

Closed
klodeckl opened this issue Jan 31, 2023 · 5 comments · Fixed by #29
Closed

feature: add check for a newer version of this script from within script #15

klodeckl opened this issue Jan 31, 2023 · 5 comments · Fixed by #29
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@klodeckl
Copy link

Hello, I just found your script, I like it! How about a self update for the update script?

@LucasLarson
Copy link
Owner

I like it!

Thank you!

How about a self update

What do you have in mind?

@klodeckl
Copy link
Author

klodeckl commented Feb 1, 2023

Check the version of the file in github and download the new version if available? (But I think my knowledge is too poor to help to develop this.)

@LucasLarson LucasLarson added the enhancement New feature or request label Feb 1, 2023
@LucasLarson
Copy link
Owner

Oh that’s a great idea – it didn’t occur to me since I built it just for me.

@LucasLarson LucasLarson changed the title Self update? feature: add check for a newer version of this script from within script Feb 2, 2023
@LucasLarson LucasLarson added the help wanted Extra attention is needed label Feb 20, 2023
@LucasLarson
Copy link
Owner

Check the version of the file in github and download the new version if available

I removed a manually added timestamp in c173aaec9cb. Restoring it and comparing it to the output of

command date -- '+%Y-%m-%d'

is probably the lowest-tech way to add this functionality

@klodeckl
Copy link
Author

I don’t really understand, you want to compare the current date of execution with a timestamp?
Why not add a version number in the script and compare it with a version file in the github master branch?
As I remember rpi update (https://github.com/raspberrypi/rpi-update) has a self update included, maybe this could be used as inspiration.

LucasLarson added a commit that referenced this issue May 21, 2023
add a version check for the updater itself to fix #15

Signed-off-by: Lucas Larson <LucasLarson@riseup.net>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants