feat: added self update mechanism (#15)

* feat: Added self update mechanism

* fix: Formatting

* fix: Formatting again

* fix: Arghhh INDENTATION

* feat: Updated readme with new command

* feat: Added shortcut command

* feat: Added more detail to the readme

* feat: Removed the check for the last update file. It seems a bit pointless to delay checking for it, it's curling github so it's not like it's a DDOS concern, and it could be the tool is getting updated often, why delay their updates? It's also just a curl, it's very inexpensive.

* feat: Removed REPO_URL, it was unused

* feat: Reverted version testing change (oops)

* feat: checking for updates timed at 1 hour

* fix: info messages formatting

---------

Co-authored-by: v4n <105587619+v4n00@users.noreply.github.com>
This commit is contained in:
Matt Cavanagh
2025-02-05 21:29:21 +00:00
committed by GitHub
parent 83e2161456
commit 1a01034816
3 changed files with 32 additions and 11 deletions
+5
View File
@@ -47,6 +47,7 @@ h2mm
- `modpack-overwrite` - Overwrite a modpack by name (or index).
- `modpack-reset` - Reset all installed modpacks.
- `reset` - Reset all installed mods.
- `update` - Update h2mm to latest version.
- `help` - Display this help message.
### Basic usage
@@ -86,6 +87,9 @@ h2mm disable -i 1 # disable mod with index 1
h2mm list
```
#### Updating the tool
Simply run `h2mm update` and the tool will guide you through updating it to the latest version.
## Compatibility
The script is developed and tested on Arch Linux, but it should work on other Linux distributions as well. If you encounter any issues, please open an issue on the repository.
@@ -118,6 +122,7 @@ You can use the short form of commands to save some time. The shortcuts are:
- `mo` for `modpack-overwrite`
- `mr` for `modpack-reset`
- `r` for `reset`
- `up` for `update`
### Modpacks support