27 lines
715 B
Bash
Executable File
27 lines
715 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"
|
|
slaves=("1" "8" "9")
|
|
|
|
_ccroot="$mcroot/.minecraft/saves/$world/computercraft/computer"
|
|
echo "Root: $_ccroot"
|
|
for computer in "$masterid" ${slaves[*]}; do
|
|
echo "Deploying to: $computer"
|
|
mkdir -p "$_ccroot/$computer"
|
|
cp common.lua "$_ccroot/$computer/autostart.lua"
|
|
done
|
|
cp masterconfig.lua "$_ccroot/$masterid/config.lua"
|
|
for slave in ${slaves[*]}; do
|
|
echo "Deploying slave config: $slave"
|
|
cp slaveconfig.lua "$_ccroot/$slave/config.lua"
|
|
done
|