keyboards/iris-ce/flash.bash

28 lines
574 B
Bash
Executable file

#!/usr/bin/env bash
# TODO: cd dirname $0
cd "$(dirname "$0")" || exit 1
cp ./config.h ~/qmk_firmware/keyboards/keebio/iris_ce/keymaps/lytedev
cp ./rules.mk ~/qmk_firmware/keyboards/keebio/iris_ce/keymaps/lytedev
cp ./keymap.c ~/qmk_firmware/keyboards/keebio/iris_ce/keymaps/lytedev
(
while true; do
echo "Trying to mount RPI-RP2..."
if udisksctl mount -b /dev/disk/by-label/RPI-RP2; then
exit 0
fi
sleep 1
done
) &
if qmk flash --keyboard keebio/iris_ce/rev1 -km lytedev; then
echo "Flashing complete!"
kill %1
exit 0
fi
kill %1
exit 1