From 2746b9c83b6660beef504622573b276291484823 Mon Sep 17 00:00:00 2001 From: Jankoy Date: Fri, 29 Mar 2024 18:52:37 -0400 Subject: [PATCH 1/5] Added a run script for linux. --- run.sh | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100755 run.sh diff --git a/run.sh b/run.sh new file mode 100755 index 0000000..a2f30b5 --- /dev/null +++ b/run.sh @@ -0,0 +1,26 @@ +#!/bin/bash + +# To make double clicking cbscript files work, +# modify the defaults of your desktop environment. +# +# To generate blocks.json, via command prompt at the minecraft server: +# java -DbundlerMainClass=net.minecraft.data.Main -jar {jar_path} --server --reports + +echo "CBScript 1.20" + +if [ $# -eq 0 ]; then + echo "No script provided." + exit +fi + +if ! [ -f $1 ]; then + echo "Please provide a valid file." + exit +fi + +echo -ne "\033]0;$(basename $1)\007" +pushd $(dirname $0) +python3 compile.py $1 +popd + +read -p "Press enter to continue..." From 289eac8da0b3a444d3f3205c884746366a1c0b14 Mon Sep 17 00:00:00 2001 From: Jankoy Date: Sun, 31 Mar 2024 22:39:48 -0400 Subject: [PATCH 2/5] Changed "/bin/bash" to "/usr/bin/env bash" and "python3" to "python" --- run.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/run.sh b/run.sh index a2f30b5..fad48a0 100755 --- a/run.sh +++ b/run.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # To make double clicking cbscript files work, # modify the defaults of your desktop environment. @@ -20,7 +20,7 @@ fi echo -ne "\033]0;$(basename $1)\007" pushd $(dirname $0) -python3 compile.py $1 +python compile.py $1 popd read -p "Press enter to continue..." From 65976572dd06424cbb15673943131a8d3441244d Mon Sep 17 00:00:00 2001 From: Jankoy Date: Tue, 2 Apr 2024 23:48:14 -0400 Subject: [PATCH 3/5] Decided it probably doesn't matter the specifics of python3 --- run.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/run.sh b/run.sh index fad48a0..e680b4d 100755 --- a/run.sh +++ b/run.sh @@ -20,7 +20,7 @@ fi echo -ne "\033]0;$(basename $1)\007" pushd $(dirname $0) -python compile.py $1 +python3 compile.py $1 popd read -p "Press enter to continue..." From d1b96bae84511eea8f62a2e6a3f6313284cf2cac Mon Sep 17 00:00:00 2001 From: Jankoy Date: Wed, 3 Apr 2024 17:21:58 -0400 Subject: [PATCH 4/5] Turns out the script didn't even work in the first place because I accidentally removed some code before publishing it lol --- run.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/run.sh b/run.sh index e680b4d..7ac5091 100755 --- a/run.sh +++ b/run.sh @@ -18,9 +18,9 @@ if ! [ -f $1 ]; then exit fi -echo -ne "\033]0;$(basename $1)\007" +ABS_DIR="$(pwd)/$1" pushd $(dirname $0) -python3 compile.py $1 +python3 compile.py ABS_DIR popd read -p "Press enter to continue..." From 68569a7a38e3df056f145f80f9433775fd52b504 Mon Sep 17 00:00:00 2001 From: Jankoy Date: Wed, 3 Apr 2024 17:23:35 -0400 Subject: [PATCH 5/5] My bad, I forgot the $ this time lol --- run.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/run.sh b/run.sh index 7ac5091..27c536e 100755 --- a/run.sh +++ b/run.sh @@ -20,7 +20,7 @@ fi ABS_DIR="$(pwd)/$1" pushd $(dirname $0) -python3 compile.py ABS_DIR +python3 compile.py $ABS_DIR popd read -p "Press enter to continue..."