Add initial stuff

This commit is contained in:
Salt 2024-02-25 22:22:02 -06:00
parent 7853e6174e
commit 144b2b9ebb
4 changed files with 7 additions and 10 deletions

2
storage-net/common.lua Normal file
View File

@ -0,0 +1,2 @@
-- MASTER SCRIPT
require "config"

View File

@ -15,14 +15,7 @@ slaveid="1"
_ccroot="$mcroot/.minecraft/saves/$world/computercraft/computer" _ccroot="$mcroot/.minecraft/saves/$world/computercraft/computer"
echo "Root: $_ccroot" echo "Root: $_ccroot"
for computer in $masterid $slaveid; do for computer in $masterid $slaveid; do
: cp common.lua "$_ccroot/$masterid/autostart.lua"
done done
if [ -f master.lua ]; then cp masterconfig.lua "$_ccroot/$masterid/config.lua"
echo "Deploying master to $masterid" cp slaveconfig.lua "$_ccroot/$slaveid/config.lua"
cp master.lua "$_ccroot/$masterid/autostart.lua"
fi
if [ -f slave.lua ]; then
echo "Deploying slave to $slaveid"
cp slave.lua "$_ccroot/$slaveid/autostart.lua"
fi

View File

@ -0,0 +1 @@
mode = "master"

View File

@ -0,0 +1 @@
mode = "slave"