Compare commits
No commits in common. "main" and "02" have entirely different histories.
7 changed files with 27 additions and 30 deletions
0
LICENSE
Executable file → Normal file
0
LICENSE
Executable file → Normal file
10
README.md
Executable file → Normal file
10
README.md
Executable file → Normal file
|
@ -1,12 +1,12 @@
|
||||||
# Luanti (Formerly Minetest)
|
# Minetest
|
||||||
|
|
||||||
Luanti related code.
|
Minetest related code.
|
||||||
|
|
||||||
# Branches
|
# Branches
|
||||||
|
|
||||||
MAIN
|
MAIN
|
||||||
|
|
||||||
Will have the most recent working tools. Testing dual branches.
|
Will have the most recent working tools.
|
||||||
|
|
||||||
DEV
|
DEV
|
||||||
|
|
||||||
|
@ -22,10 +22,6 @@ update.pl - Perl script can be run in the mods folder to update mods. Wrote this
|
||||||
|
|
||||||
# Status
|
# Status
|
||||||
|
|
||||||
As of 1/12/25:
|
|
||||||
|
|
||||||
Got around to updating things to 5.10 finally. I'me using it again to manage my Minetest server. I am going to go through with the plans of updating and expanding this finally. I know I've been saying that a while, but since I'm using it again its time to finally do this.
|
|
||||||
|
|
||||||
As of 4/15/23:
|
As of 4/15/23:
|
||||||
|
|
||||||
Some minor updates for minetest 5.7.0. All code was given a test as part of my server's update to minetest 5.7.0. Seems to work just fine for what I made it for. Expanding the script to include more mod management realted functions is certainly something that will happen as I'm tired of adding new mods manually. Additional updates to the build script for optimized building.
|
Some minor updates for minetest 5.7.0. All code was given a test as part of my server's update to minetest 5.7.0. Seems to work just fine for what I made it for. Expanding the script to include more mod management realted functions is certainly something that will happen as I'm tired of adding new mods manually. Additional updates to the build script for optimized building.
|
||||||
|
|
6
buildstable.bash
Executable file → Normal file
6
buildstable.bash
Executable file → Normal file
|
@ -1,8 +1,8 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# wget https://github.com/minetest/minetest/archive/master.tar.gz
|
# wget https://github.com/minetest/minetest/archive/master.tar.gz
|
||||||
wget https://github.com/minetest/minetest/archive/refs/tags/5.10.0.tar.gz
|
wget https://github.com/minetest/minetest/archive/refs/tags/5.7.0.tar.gz
|
||||||
tar xf 5.10.0.tar.gz
|
tar xf 5.7.0.tar.gz
|
||||||
cd minetest-5.10.0
|
cd minetest-5.7.0
|
||||||
cd games/
|
cd games/
|
||||||
wget https://github.com/minetest/minetest_game/archive/master.tar.gz
|
wget https://github.com/minetest/minetest_game/archive/master.tar.gz
|
||||||
tar xf master.tar.gz
|
tar xf master.tar.gz
|
||||||
|
|
File diff suppressed because one or more lines are too long
BIN
mods
BIN
mods
Binary file not shown.
10
server.bash
Executable file → Normal file
10
server.bash
Executable file → Normal file
|
@ -1,18 +1,14 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
|
|
||||||
basedir=/home/kake26/minetest-5.10.0
|
|
||||||
worlddir=/home/kake26/minetest/minetest-server/.minetest/worlds/world2
|
|
||||||
confdir=/home/kake26/minetest
|
|
||||||
# script to start and stop minetest server
|
# script to start and stop minetest server
|
||||||
|
|
||||||
|
|
||||||
if [[ $1 == "start" ]]
|
if [[ $1 == "start" ]]
|
||||||
then
|
then
|
||||||
echo "STARTING"
|
echo "STARTING"
|
||||||
$basedir/bin/minetestserver --quiet --logfile $basedir/minetest.log --config $confdir/conf/minetest.conf --world $worlddir &
|
/home/kake26/minetest-5.7.0/bin/minetestserver --quiet --logfile /home/kake26/minetest/minetest.log --config /home/kake26/minetest/conf/minetest.conf --world /home/kake26/minetest/minetest-server/.minetest/worlds/world2/ &
|
||||||
pid=$!
|
pid=$!
|
||||||
echo $pid > $basedir/mintest.pid
|
echo $pid > /home/kake26/minetest/mintest.pid
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if pidof minetestserver
|
if pidof minetestserver
|
||||||
|
@ -21,7 +17,7 @@ then
|
||||||
echo "OK"
|
echo "OK"
|
||||||
else
|
else
|
||||||
# Seriously why not
|
# Seriously why not
|
||||||
$basedir/bin/minetestserver --quiet --logfile $confdir/minetest.log --config $confdir/conf/minetest.conf --world $worlddir &
|
/home/kake26/minetest-5.7.0/bin/minetestserver --quiet --logfile /home/kake26/minetest/minetest.log --config /home/kake26/minetest/conf/minetest.conf --world /home/kake26/minetest/minetest-server/.minetest/worlds/world2/ &
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ $1 == "stop" ]]
|
if [[ $1 == "stop" ]]
|
||||||
|
|
30
update.pl
Executable file → Normal file
30
update.pl
Executable file → Normal file
|
@ -1,19 +1,17 @@
|
||||||
#!/usr/bin/perl
|
#!/usr/bin/perl
|
||||||
|
|
||||||
# This script will check and update minetest mods as needed. It is not 100% perfect, but it does work.
|
|
||||||
# Currently, any version checking is done against the mod file generated from a previous run.
|
|
||||||
|
|
||||||
# This was a bash script until I determined the level of invoking the ancient gods of the console required to make
|
# This was a bash script until I determined the level of invoking the ancient gods of the console required to make
|
||||||
# that work would be just too much
|
# that work would be just too much
|
||||||
|
|
||||||
use Storable;
|
use Storable;
|
||||||
|
#use Data::Dumper;
|
||||||
|
|
||||||
# I know declaring a empty hash is 100% unnessecary but I am anyway
|
# I know declaring a empty hash is 100% unnessecary but I am anyway
|
||||||
%conf = {}; # this will be stored used to keep track of stuff
|
%conf = {}; # this will be stored used to keep track of stuff
|
||||||
|
|
||||||
$updfile = "index.json"; # I could use JSON here, but it might be easier to abuse jq
|
$updfile = "index.json"; # I could use JSON here, but it might be easier to abuse jq
|
||||||
$updlsturl = "https://content.minetest.net/api/packages/"; # give use a json file of everything available
|
$updlsturl = "https://content.minetest.net/api/packages/"; # give use a json file of everything available
|
||||||
$modpath = "/home/kake26/minetest-5.10.0/mods"; # where your server stores its mods
|
$modpath = "/home/kake26/.minetest/mods/"; # where your server stores its mods
|
||||||
|
|
||||||
sub chk_update () {
|
sub chk_update () {
|
||||||
|
|
||||||
|
@ -69,6 +67,12 @@ store \%conf, 'mods';
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
sub get_file () {
|
||||||
|
# get the
|
||||||
|
system("wget -O index2.json $updlsturl");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
sub do_update ($mod,$ver,$author) {
|
sub do_update ($mod,$ver,$author) {
|
||||||
# https://content.minetest.net/packages/TenPlus1/mob_horse/download/
|
# https://content.minetest.net/packages/TenPlus1/mob_horse/download/
|
||||||
# https://content.minetest.net/packages/jp/i3/releases/14157/download/
|
# https://content.minetest.net/packages/jp/i3/releases/14157/download/
|
||||||
|
@ -94,18 +98,20 @@ return;
|
||||||
# Maybe get ready and check update should be called every time
|
# Maybe get ready and check update should be called every time
|
||||||
|
|
||||||
if (-e "mods"){
|
if (-e "mods"){
|
||||||
|
# load data
|
||||||
# load data and business as usual
|
|
||||||
|
|
||||||
print "Loading data\n";
|
print "Loading data\n";
|
||||||
$conf = retrieve('mods');
|
$conf = retrieve('mods');
|
||||||
system("wget -O index2.json $updlsturl"); # Don't need a whole sub for one command
|
get_file();
|
||||||
chk_update();
|
chk_update();
|
||||||
update_files();
|
update_files();
|
||||||
}else{
|
}else{
|
||||||
# if the mods file doesn't exist then we need to create it
|
# check if index.json exists if not then create it
|
||||||
print "Creating mods file\n";
|
if (-e "index.json") {
|
||||||
|
# do noothing
|
||||||
|
}else{
|
||||||
system("wget -O index.json $updlsturl");
|
system("wget -O index.json $updlsturl");
|
||||||
|
}
|
||||||
get_ready();
|
get_ready();
|
||||||
print "Done. You will need to run me again to update mods.\n";
|
# chk_update expects a hash retrived from storables so program needs to be run again after this
|
||||||
}
|
#chk_update();
|
||||||
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue