Updated readme

master
Your Name 2012-12-16 17:33:57 +01:00
parent 6c0ad83a97
commit 1414a9f960
3 changed files with 32 additions and 17 deletions

View File

@ -8,15 +8,18 @@ Install:
--------
- cd into your main minetest-folder
- git clone git://github.com/iqualfragile/minetest_scripts.git
- ln minetest_scripts/update.sh mods/minetest/update.sh
- ln minetest_scripts/start.sh start.sh
- chmod +x update.sh
- cp singlemods.example singlemods
- cp modfolders.example modfolders
- add your own locations to singlemods/modfolders
git clone git://github.com/iqualfragile/minetest_scripts.git && ln minetest_scripts/update.sh mods/minetest/update.sh && ln minetest_scripts/start.sh start.sh
git clone git://github.com/iqualfragile/minetest_scripts.git && chmod +x update.sh && cp singlemods.example singlemods && cp modfolders.example modfolders
update.sh
---------
Automaticly updates mods which were cloned from a repo
merges your local changes when possible so you can customize your experience while still being up-to-date
start.sh
--------
Updates & rebuilds minetest, updatest minetest_game, calls update.sh and starts the minetest-server
Updates everything, rebuilds minetest and starts the server

View File

@ -1,2 +1 @@
..
../games/minetest_game

37
update.sh Normal file → Executable file
View File

@ -1,31 +1,44 @@
#!/bin/bash
# updates all mods wich are cloned from an git- or hg-repo
# put into minetest/mods/minetest
dir="$(pwd)"
function up {
function gitup {
cd $1
#echo $1
git pull&
cd ..
echo $(git stash save > /dev/zero ; git pull; git stash pop > /dev/zero ) 2> /dev/zero &
cd $dir
}
function hgup {
cd $1
hg pull -u&
cd ..
hg pull -u 2> /dev/zero &
cd $dir
}
# update mods using git (github…)
mods="$(find -name '*.git' -printf '%h\n' | cut -c 3-)"
function up {
gitup $1
hgup $1
}
function dirup {
# update mods using git (github, gitorious,…)
mods="$(find $1 -name '*.git' -printf '%h\n')"
for line in $mods; do
up $line
gitup $line
done
# update mods using hg
mods="$(find -name '*.hg' -printf '%h\n' | cut -c 3-)"
mods="$(find $1 -name '*.hg' -printf '%h\n')"
for line in $mods; do
up $line
done
}
for modfolder in $(cat modfolders); do
dirup $modfolder
done
for singlemod in $(cat singlemods); do
up $singlemod
done
wait
echo 'Done updating plugins'
echo 'Done updating stuffs'