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

cheapie
Member
 
Posts: 304
Joined: Mon May 14, 2012 00:59
GitHub: cheapie
IRC: cheapie
In-game: cheapie

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

by cheapie » Tue Nov 12, 2013 23:28

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
Last edited by cheapie on Wed Nov 13, 2013 02:32, edited 1 time in total.
Signature antivirus (Linux only): "grep -iv -- Signature\ virus" (minus the quotes, of course)
Signature goes in stdin, viruses are removed, and cleaned signature comes out on stdout.
 

User avatar
Inocudom
Member
 
Posts: 2889
Joined: Sat Sep 29, 2012 01:14
IRC: Inocudom
In-game: Inocudom

by Inocudom » Wed Nov 13, 2013 00:15

This script is a very good idea. I just wish that the same principle could be used for updating Minetest on Windows computers.
 

User avatar
hoodedice
Member
 
Posts: 1372
Joined: Sat Jul 06, 2013 06:33

by hoodedice » Wed Nov 13, 2013 04:06

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
7:42 PM - Bauglio: I think if you go to staples you could steal firmware from a fax machine that would run better than win10 does on any platform
7:42 PM - Bauglio: so fudge the stable build
7:43 PM - Bauglio: get the staple build
 


Return to Minetest General

Who is online

Users browsing this forum: No registered users and 9 guests

cron