From 1b38039f62c6e1a034c0c7c8a6de05d5fa3d2d38 Mon Sep 17 00:00:00 2001 From: Jacob Babor Date: Sun, 25 Feb 2024 22:14:04 -0600 Subject: [PATCH] Add deploy script --- storage-net/deploy.sh | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100755 storage-net/deploy.sh diff --git a/storage-net/deploy.sh b/storage-net/deploy.sh new file mode 100755 index 0000000..1bacf46 --- /dev/null +++ b/storage-net/deploy.sh @@ -0,0 +1,24 @@ +#! /bin/sh +# +# deploy.sh +# Copyright (C) 2024 Jacob Babor +# +# 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" +ls -al "$_ccroot" + +if [ -f master.lua ]; then + cp master.lua "$_ccroot/$masterid/autostart.lua" +fi +if [ -f slave.lua ]; then + cp slave.lua "$_ccroot/$slaveid/autostart.lua" +fi +