Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions run.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
#!/usr/bin/env 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

ABS_DIR="$(pwd)/$1"
pushd $(dirname $0)
python3 compile.py $ABS_DIR
popd

read -p "Press enter to continue..."