Browse Source

Fixed script, edited README

master
Katherine Peeters 5 months ago
parent
commit
409de1cf50
Signed by: katp32 <alden.peeters@leagueh.xyz> GPG Key ID: CDAD63AE9DA934BE
2 changed files with 26 additions and 9 deletions
  1. +2
    -2
      README.md
  2. +24
    -7
      update.sh

+ 2
- 2
README.md View File

@@ -6,11 +6,11 @@ A Minetest game focused on stability and completion, originally designed for the

Unlike most games, this doesn't just work out of the box. You will need to run `update.sh` to properly build the mod. What this does is download the latest versions of all the mods included in the pack.

Once this is done, the `game` folder will contain the complete game. It is recommended that you create a symlink in your mods folder to this directory, eg using `ln -s [REPO_PATH]/game ~/.minetest/games/cometest`.
Once this is done, the `game` folder will contain the complete game. It is recommended that you create a symlink in your mods folder to this directory, eg using `ln -s [REPO_PATH]/game ~/.minetest/games/comtest`.

## Mod list

Provided in `git-mods.txt`. In fact, editing this file will change what mods are installed! Note that you can also put modpacks in here; since Minetest doesn't support nested modpacks, they will be automatically unpacked. Don't worry, they'll still be updated just like regular mods.
Provided in `git-mods.txt`. In fact, editing this file will change what mods are installed! Note that you can also put modpacks in here; since Minetest doesn't support nested modpacks, they will be automatically unpacked. Don't worry, they'll still be updated just like regular mods. Unpacking entire games is also supported.

## Patches



+ 24
- 7
update.sh View File

@@ -14,6 +14,9 @@ mkdir $OUTDIR

# Restore packs
for pack in $PAKDIR/*; do
if [[ $pack == *'*'* ]]; then
break
fi
if [ -d $OUTDIR-old/$(basename $pack) ]; then
rm -rf $OUTDIR-old/$(basename $pack)
fi
@@ -22,6 +25,9 @@ done

# Restore submodules
for mod in $SUBDIR/*; do
if [[ $mod == *'*'* ]]; then
break
fi
if [ -d $OUTDIR-old/$(basename $mod) ]; then
rm -rf $OUTDIR-old/$(basename $mod)
fi
@@ -41,10 +47,11 @@ while read urlw; do
# Download/update repos
name=$(basename $url .git)
echo "Updating $name"
if [ -d "$OUTDIR-old/$name" ]; then
mv $OUTDIR-old/$name $OUTDIR/
git -C $OUTDIR/$name reset --hard
git -C $OUTDIR/$name pull
git -C $OUTDIR/$name reset --hard --quiet
git -C $OUTDIR/$name pull --quiet
else
git clone $url $OUTDIR/$name
fi
@@ -55,7 +62,10 @@ done < git-mods.txt
rm -rf $OUTDIR-old

# Unpack modpacks
for packw in $OUTDIR/*/modpack.txt; do
for packw in $OUTDIR/*/modpack.*; do
if [[ $packw == *'*'* ]]; then
break
fi
echo "Unpacking $packw (modpack)"
p=$(dirname $packw)
mv $p $PAKDIR/
@@ -66,8 +76,10 @@ for packw in $OUTDIR/*/modpack.txt; do
fi
done

# Unpack games
for gamew in $OUTDIR/*/game.conf; do
if [[ $gamew == *'*'* ]]; then
break
fi
echo "Unpacking $gamew (game)"
g=$(dirname $gamew)
mv $g $PAKDIR/
@@ -79,6 +91,11 @@ for gamew in $OUTDIR/*/game.conf; do
done

# Apply patches
for i in `ls patches/*.patch`; do
patch -p0 < $i
done
echo "Applying patches..."
if ls patches/*.patch 1> /dev/null 2>&1; then
for i in `ls patches/*.patch`; do
patch -p0 < $i
done
fi

echo "Done!"

Loading…
Cancel
Save