18 lines
297 B
Plaintext
18 lines
297 B
Plaintext
|
#!/usr/bin/env bash
|
||
|
|
||
|
set -e
|
||
|
|
||
|
DEVICE=$1
|
||
|
SIDE=$2
|
||
|
|
||
|
if [ "$SIDE" != "left" ] && [ "$SIDE" != "right" ]; then
|
||
|
echo "Usage: ./flash device side"
|
||
|
echo " eg: ./flash /dev/sdb right"
|
||
|
exit 1
|
||
|
fi
|
||
|
|
||
|
sudo mount "$DEVICE" /mnt/usb
|
||
|
sudo cp "out/corne_$SIDE.uf2" /mnt/usb
|
||
|
sudo sync
|
||
|
sudo umount /mnt/usb
|