Add the script and README.

This commit is contained in:
KikooDX 2020-12-17 19:16:25 +01:00
parent 185dd38869
commit 62fd338a22
2 changed files with 44 additions and 1 deletions

View File

@ -1,3 +1,21 @@
# cazy
A simple script to improve gint projects' testing workflow.
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 <F1>.
Then execute as root:
```sh
# cazy <target> <device> <mounting point>
# #example
# cazy fx /dev/sdc /mnt/calc
```

25
cazy Executable file
View File

@ -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