Skip to content

Instantly share code, notes, and snippets.

@n0tty n0tty/teensyduino.sh
Created Oct 26, 2018

Embed
What would you like to do?
teensyduino.sh fix
#!/bin/bash
sleep 2
export HOME=$2
$1 &
sleep 5
xdotool search --class "teensyduino" \
windowfocus \
key space sleep 1 \
key Tab sleep 0.4 \
key Tab sleep 0.4 \
key Tab sleep 0.4 \
key Tab sleep 0.4 \
key space sleep 1 \
key Tab sleep 0.4 \
key Tab sleep 0.4 \
key Tab sleep 0.4 \
key Tab sleep 0.4 \
key space sleep 1\
key Tab sleep 0.4 \
key space sleep 1\
key Tab sleep 0.4 \
key space sleep 35
a=$(ps aux | grep TeensyduinoInstall.linux64 | head -n 1 | awk '{print $2}')
kill -9 $a 1>/dev/null || exit 1
# killall $(basename $1) >/dev/null || exit 1
[ -d $2/hardware/teensy ] || exit 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.