fxsdk: finally implement the send-fx and send-cg commands

This commit is contained in:
Lephenixnoir 2022-04-15 10:53:56 +01:00
parent 2cc5d7ac5b
commit c517447a02
Signed by: Lephenixnoir
GPG Key ID: 1BBA026E13FC0495
1 changed files with 16 additions and 4 deletions

View File

@ -210,13 +210,25 @@ fxsdk_send() {
}
fxsdk_send_fx() {
echo "$TAG Installing for fx9860g using p7"
make install-fx
echo "$TAG Installing for fx-9860G using p7"
if ! command -v p7 >/dev/null 2>&1; then
echo "error: p7 is not installed or not available"
return 1
fi
g1a_files=$(find -maxdepth 1 -name '*.g1a')
echo "$TAG Running: p7 send -f ${g1a_files}"
p7 send -f ${g1a_files}
}
fxsdk_send_cg() {
# TODO
echo "error: this is tricky and not implemented yet, sorry x_x"
echo "$TAG Installing for fx-CG using fxlink"
if ! command -v fxlink >/dev/null 2>&1; then
echo "error: fxlink is not installed or not available"
return 1
fi
g3a_files=$(find -maxdepth 1 -name '*.g3a')
echo "$TAG Running: fxlink -sw ${g3a_files}"
fxlink -sw ${g3a_files}
}
# Parse command name