From 62fd338a22db604f9194c1e8b84e7b9a4d65b8d2 Mon Sep 17 00:00:00 2001 From: KikooDX Date: Thu, 17 Dec 2020 19:16:25 +0100 Subject: [PATCH] Add the script and README. --- README.md | 20 +++++++++++++++++++- cazy | 25 +++++++++++++++++++++++++ 2 files changed, 44 insertions(+), 1 deletion(-) create mode 100755 cazy diff --git a/README.md b/README.md index 7758b23..18da1d7 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,21 @@ # cazy -A simple script to improve gint projects' testing workflow. \ No newline at end of file +A simple script to improve +[gint](https://gitea.planet-casio.com/Lephenixnoir/gint) +projects' testing workflow. +This tool compiles your project using +[fxsdk](https://gitea.planet-casio.com/Lephenixnoir/fxsdk) +and transfer it to your calculator using simple GNU utilities. + +# Installation +Clone this repository and add it to your path. + +# Usage +Use `cazy` in the base folder of your project. +Plug in your calculator, wait for the prompt and press . +Then execute as root: +```sh +# cazy +# #example +# cazy fx /dev/sdc /mnt/calc +``` diff --git a/cazy b/cazy new file mode 100755 index 0000000..15df2a9 --- /dev/null +++ b/cazy @@ -0,0 +1,25 @@ +#!/bin/sh +# Cozy, lazy build process. +TARGET=$1 +DEVICE=$2 +MOUNT_POINT=$3 +echo "Target: $TARGET" +echo "Device: $DEVICE" +echo "Mount point: $MOUNT_POINT" +echo "Building…" +./make_levels.sh +fxsdk build-$TARGET > /dev/null +echo "Mount…" +mkdir -p $MOUNT_POINT +mount -v $DEVICE\1 $MOUNT_POINT +echo "Tranfer…" +if [ "$TARGET" = "fx" ] +then + cp -v *.g1a $MOUNT_POINT +else + cp -v *.g3a $MOUNT_POINT +fi +echo "Unmount…" +umount -v $DEVICE\1 +echo "Eject…" +eject -m $DEVICE # ugly error message here, but it works