Page 1 of 1

For those of us that keep all of our mods up-to-date with Git...

PostPosted: Tue Nov 12, 2013 23:28
by cheapie
I'm sure that "cd minetest_game git pull cd .. cd minetest-mod-mesecons git pull cd .. " (and so on) gets boring after a while, so I made a little script that updates all Git repositories in the current folder. Just make a folder on your system, "git clone" the mods into there, then symlink them into wherever the game wants them (like ~/.minetest/mods/). Then, place this script in the folder that has all of your mods in it, and run it. It will automatically run "git pull" in each folder. Note that it is for Linux and Mac only (although Windows users could probably use something like Cygwin), and requires bash and git.


EDIT: I just noticed that the forum ate my attachment, so I'll just post the code here.
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
#!/bin/bash
shopt -s extglob
for i in */
do
echo Updating `echo $i | rev | cut -c 2- | rev`...
cd $i
git pull
cd ..
echo
done

PostPosted: Wed Nov 13, 2013 00:15
by Inocudom
This script is a very good idea. I just wish that the same principle could be used for updating Minetest on Windows computers.

PostPosted: Wed Nov 13, 2013 04:06
by hoodedice
Inocudom wrote:This script is a very good idea. I just wish that the same principle could be used for updating Minetest on Windows computers.


We do have a git client. Just have to clone the mods