lynxthecat / cake-autorate

Eliminate the excess latency and jitter terrorizing your 4G, 5G, LTE, Starlink or other variable rate connection!
https://www.bufferbloat.net
GNU General Public License v2.0
268 stars 24 forks source link

Ensure setup.sh fetches the latest version of itself #224

Closed rany2 closed 1 year ago

rany2 commented 1 year ago

@lynxthecat Please test this out, but I think it should work.

rany2 commented 1 year ago

Don't merge it yet, still need to preserve arguments.

Edit: all good

lynxthecat commented 1 year ago

Should we log downloading new script and latest commit / updating to commit number?

rany2 commented 1 year ago

Should we log downloading new script and latest commit / updating to commit number?

I don't follow

lynxthecat commented 1 year ago

If we overwrite setup.sh should we not log that? Also should we not inform user of any upgrade? So print out the commit number previously installed and the one that has just been installed?

rany2 commented 1 year ago

It's not actually overwriting anyway, it's just loading it on the fly

lynxthecat commented 1 year ago

OK but what about informing user of the upgrade.. e.g. upgraded from version/commit to version/commit?

rany2 commented 1 year ago

It's not knowable anyway, we can't do much here.

rany2 commented 1 year ago

It's unconditionally going to load it from github if __CAKE_AUTORATE_URL_LOADED was not set

lynxthecat commented 1 year ago

We know previous version from the version file you created. And we know current version because you obtain that with the setup.sh already.

By the way when running I only see:

root@OpenWrt-1:~/cake-autorate# ./setup.sh
Installing cake-autorate in /root/cake-autorate...
Previous configuration present - keep it? [Y/n] root@OpenWrt-1:~/cake-autorate#
rany2 commented 1 year ago

Meh, too complicated.