mc-scripts/storage-net/deploy.sh
2024-02-25 22:15:30 -06:00

29 lines
647 B
Bash
Executable File

#! /bin/sh
#
# deploy.sh
# Copyright (C) 2024 Jacob Babor <jacob@babor.tech>
#
# Distributed under terms of the MIT license.
#
mcroot="$HOME/.var/app/org.prismlauncher.PrismLauncher/data/PrismLauncher/instances/ComputerCraft Sandbox/"
world="New World"
masterid="0"
slaveid="1"
_ccroot="$mcroot/.minecraft/saves/$world/computercraft/computer"
echo "Root: $_ccroot"
for computer in $masterid $slaveid; do
:
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