2024-02-25 22:14:04 -06:00
|
|
|
#! /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"
|
2024-02-25 22:15:30 -06:00
|
|
|
echo "Root: $_ccroot"
|
|
|
|
for computer in $masterid $slaveid; do
|
|
|
|
:
|
|
|
|
done
|
2024-02-25 22:14:04 -06:00
|
|
|
if [ -f master.lua ]; then
|
2024-02-25 22:15:30 -06:00
|
|
|
echo "Deploying master to $masterid"
|
2024-02-25 22:14:04 -06:00
|
|
|
cp master.lua "$_ccroot/$masterid/autostart.lua"
|
|
|
|
fi
|
|
|
|
if [ -f slave.lua ]; then
|
2024-02-25 22:15:30 -06:00
|
|
|
echo "Deploying slave to $slaveid"
|
2024-02-25 22:14:04 -06:00
|
|
|
cp slave.lua "$_ccroot/$slaveid/autostart.lua"
|
|
|
|
fi
|
|
|
|
|