From 144b2b9ebb64065fef672799db4949b58ad8df9b Mon Sep 17 00:00:00 2001 From: Jacob Babor Date: Sun, 25 Feb 2024 22:22:02 -0600 Subject: [PATCH] Add initial stuff --- storage-net/common.lua | 2 ++ storage-net/deploy.sh | 13 +++---------- storage-net/masterconfig.lua | 1 + storage-net/slaveconfig.lua | 1 + 4 files changed, 7 insertions(+), 10 deletions(-) create mode 100644 storage-net/common.lua create mode 100644 storage-net/masterconfig.lua create mode 100644 storage-net/slaveconfig.lua diff --git a/storage-net/common.lua b/storage-net/common.lua new file mode 100644 index 0000000..8bc6ebf --- /dev/null +++ b/storage-net/common.lua @@ -0,0 +1,2 @@ +-- MASTER SCRIPT +require "config" diff --git a/storage-net/deploy.sh b/storage-net/deploy.sh index 28a5e85..715a021 100755 --- a/storage-net/deploy.sh +++ b/storage-net/deploy.sh @@ -15,14 +15,7 @@ slaveid="1" _ccroot="$mcroot/.minecraft/saves/$world/computercraft/computer" echo "Root: $_ccroot" for computer in $masterid $slaveid; do - : + cp common.lua "$_ccroot/$masterid/autostart.lua" done -if [ -f master.lua ]; then - echo "Deploying master to $masterid" - 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 - +cp masterconfig.lua "$_ccroot/$masterid/config.lua" +cp slaveconfig.lua "$_ccroot/$slaveid/config.lua" diff --git a/storage-net/masterconfig.lua b/storage-net/masterconfig.lua new file mode 100644 index 0000000..9a481b7 --- /dev/null +++ b/storage-net/masterconfig.lua @@ -0,0 +1 @@ +mode = "master" diff --git a/storage-net/slaveconfig.lua b/storage-net/slaveconfig.lua new file mode 100644 index 0000000..a39cb2b --- /dev/null +++ b/storage-net/slaveconfig.lua @@ -0,0 +1 @@ +mode = "slave"