update-minetest-mods Linux bash scripts
-
- Member
- Posts: 177
- Joined: Mon Dec 07, 2020 01:04
- GitHub: ronoaldo
- IRC: ronoaldo
- In-game: RonoaldoKakashi
- Location: São Paulo, Brasil
- Contact:
Re: update-minetest-mods Linux bash scripts
I have started a tool to download from CDB but update is not yet implemented. Search and install is, missing dependency auto install.
Interested into joining forces? I could try to port to Python, but I do prefer Go as it generates a single binary at the end and can run on multiple platforms.
viewtopic.php?f=14&t=26446&p=392148#p392148
Interested into joining forces? I could try to port to Python, but I do prefer Go as it generates a single binary at the end and can run on multiple platforms.
viewtopic.php?f=14&t=26446&p=392148#p392148
-
- Member
- Posts: 177
- Joined: Mon Dec 07, 2020 01:04
- GitHub: ronoaldo
- IRC: ronoaldo
- In-game: RonoaldoKakashi
- Location: São Paulo, Brasil
- Contact:
Re: update-minetest-mods Linux bash scripts
If helps, since I use a mix of mods from both contentdb and git, here is my work so far, updated to also "git pull" when visiting a mod that is in a git repo:
https://github.com/ronoaldo/minetools/r ... tag/v0.1.4
https://github.com/ronoaldo/minetools/r ... tag/v0.1.4
- Miniontoby
- Member
- Posts: 616
- Joined: Fri Mar 01, 2019 19:25
- GitHub: Miniontoby
- IRC: Miniontoby
- In-game: Miniontoby
- Location: The Netherlands
Re: update-minetest-mods Linux bash scripts
Nice. But yeah I think imma sticking to git
Mostly because i cannot use 'go'
But if you can add auto update and maybe add support to mtctl (to auto restart server....). would be nice ;)
Mostly because i cannot use 'go'
But if you can add auto update and maybe add support to mtctl (to auto restart server....). would be nice ;)
-
- Member
- Posts: 177
- Joined: Mon Dec 07, 2020 01:04
- GitHub: ronoaldo
- IRC: ronoaldo
- In-game: RonoaldoKakashi
- Location: São Paulo, Brasil
- Contact:
Re: update-minetest-mods Linux bash scripts
Ah sure :) I got the tool working for git as well as mods from contentdb. You don't need to use Go itself, I made some pre-compiled versions for download under Releases on Github.
I'm using it to build my server images with a Docker container. In a Dockerfile it can be used like this:
I use it here: https://github.com/ronoaldo/mercurio
About mtctl: is this another tool already implemented?
For updates of mods, you can do it like this using the program I wrote:
This will fetch all new versions (if applicable) from contentdb and try a git pull as well to keep all mods in the mods/ folder updated.
I'm using it to build my server images with a Docker container. In a Dockerfile it can be used like this:
Code: Select all
FROM ghcr.io/ronoaldo/minetestserver:stable-5
USER root
RUN cd /usr/share/minetest &&\
contentdb install TenPlus1/ethereal
USER minetest
About mtctl: is this another tool already implemented?
For updates of mods, you can do it like this using the program I wrote:
Code: Select all
contentdb update
- Miniontoby
- Member
- Posts: 616
- Joined: Fri Mar 01, 2019 19:25
- GitHub: Miniontoby
- IRC: Miniontoby
- In-game: Miniontoby
- Location: The Netherlands
Re: update-minetest-mods Linux bash scripts
Oke, but yeah i am on Openbsd
I don't have docker!ronoaldo wrote: ↑Thu Sep 23, 2021 21:24I'm using it to build my server images with a Docker container. In a Dockerfile it can be used like this:I use it here: https://github.com/ronoaldo/mercurioCode: Select all
FROM ghcr.io/ronoaldo/minetestserver:stable-5 USER root RUN cd /usr/share/minetest &&\ contentdb install TenPlus1/ethereal USER minetest
mtctl is my minetest server control command for all UNIX OS, check it here
Oke, thanks for the information, but yeah I don't know....ronoaldo wrote: ↑Thu Sep 23, 2021 21:24For updates of mods, you can do it like this using the program I wrote:
This will fetch all new versions (if applicable) from contentdb and try a git pull as well to keep all mods in the mods/ folder updated.Code: Select all
contentdb update
-
- Member
- Posts: 177
- Joined: Mon Dec 07, 2020 01:04
- GitHub: ronoaldo
- IRC: ronoaldo
- In-game: RonoaldoKakashi
- Location: São Paulo, Brasil
- Contact:
Re: update-minetest-mods Linux bash scripts
I see. Our projects have very little in common then. Let's keep them separate as of now.
Do your project is hosted somewhere online? I could not figure it out from the link you shared in the forum post. I ask because I also like Bash (for Linux in my case) and perhaps it worth seeing if I can contribute. If you are accepting contributions, off course.
Do your project is hosted somewhere online? I could not figure it out from the link you shared in the forum post. I ask because I also like Bash (for Linux in my case) and perhaps it worth seeing if I can contribute. If you are accepting contributions, off course.
- Miniontoby
- Member
- Posts: 616
- Joined: Fri Mar 01, 2019 19:25
- GitHub: Miniontoby
- IRC: Miniontoby
- In-game: Miniontoby
- Location: The Netherlands
Re: update-minetest-mods Linux bash scripts
Uhhh the project itself is not only for openbsd... but yeah i am also wanting to have it for multi OS.ronoaldo wrote: ↑Sat Sep 25, 2021 15:34I see. Our projects have very little in common then. Let's keep them separate as of now.
Do your project is hosted somewhere online? I could not figure it out from the link you shared in the forum post. I ask because I also like Bash (for Linux in my case) and perhaps it worth seeing if I can contribute. If you are accepting contributions, off course.
About the code: check my signature below this post (p.s. i changed the topic today)
Re: update-minetest-mods Linux bash scripts
Wow, what a time-saver!
I had a problem when updating. The error was:
My solution was to remove the folder and re-install mesecon.
And second, i was working in the /mods/ folder. When installing, it creates a /mod/ folder into the /mod/-folder ;-). Should there be a check what the path is?
I had a problem when updating. The error was:
But mesecons exists. Maybe i had installed a to old version?Checking mod dir ./mods/mesecons Installed version /mesecons@0, update: error upgrading mod mods/mesecons: contentdb: package not found
My solution was to remove the folder and re-install mesecon.
And second, i was working in the /mods/ folder. When installing, it creates a /mod/ folder into the /mod/-folder ;-). Should there be a check what the path is?
-
- Member
- Posts: 177
- Joined: Mon Dec 07, 2020 01:04
- GitHub: ronoaldo
- IRC: ronoaldo
- In-game: RonoaldoKakashi
- Location: São Paulo, Brasil
- Contact:
Re: update-minetest-mods Linux bash scripts
Hi! I am assuming you have used the 'contentdb' CLI tool I wrote for this, is that correct?stylite wrote: ↑Wed Aug 10, 2022 20:49Wow, what a time-saver!
I had a problem when updating. The error was:But mesecons exists. Maybe i had installed a to old version?Checking mod dir ./mods/mesecons Installed version /mesecons@0, update: error upgrading mod mods/mesecons: contentdb: package not found
My solution was to remove the folder and re-install mesecon.
The tool checks the mod author/version from the downloaded mod/modpack.conf file. It is needed because of how the API works, as it prefixes the mod with the author name in the URL to allow to discover the package versions. Maye this could allow you to update mesecons in your case:
Code: Select all
echo 'author = Jeija' >> mods/mesecons/modpack.conf
This is as example usage where it installs an older version, then it updates mesecons:
Code: Select all
$ contentdb install Jeija/mesecons@12542
Fetching package details: Jeija/mesecons
Downloading Jeija/mesecons@12542 ...
Extracting package contents ...
Installed Jeija/mesecons into mods/mesecons
* Dependencies:
* Optional dependencies:
$ contentdb update
Updating 1 mods in ./mods ...
* Checking mod dir ./mods/mesecons Installed version Jeija/mesecons@12542, remote version Jeija/mesecons@13007: updating to version 13007 ...
Fetching package details: Jeija/mesecons
Downloading Jeija/mesecons@13007 ...
Removing previous installation (performing in-place update as requested) ...
Extracting package contents ...
Installed Jeija/mesecons into mods/mesecons
* Dependencies:
* Optional dependencies:
You are correct. Since the minetest build can be configured with different system paths and both system path and user path are scanned to discover where mods are, I opted to expect that the tool is executed at the top leve dir where minetest data is stored. For instance, if you use the build flag RUN_IN_PLACE=1, the tool should be executed at the root source tree. If you are installing/updating user mods, it expectes to start from ~/.minetest and for system-wide mods it expects to start at /usr/share/minetest. It will create the mods subdir if it is not found! This also has another use case: download a set of mods to build a bundle and move it elsewhere later on.
However, detecting if we are under a folder named mods and using it regardless could be a good default indeed which also would work!
Who is online
Users browsing this forum: Bing [Bot] and 5 guests