Skip to content

Instantly share code, notes, and snippets.

@gogoprog
Last active January 22, 2016 13:07
Show Gist options
  • Save gogoprog/2304b81d55fda0cba312 to your computer and use it in GitHub Desktop.
Save gogoprog/2304b81d55fda0cba312 to your computer and use it in GitHub Desktop.
Script to automatically update the software on a mbed device
#!/bin/bash
MBED="/run/media/gogoprog/MBED"
BIN_LOCATION="/home/gogoprog/Downloads"
while [ true ]
do
stat -t ${BIN_LOCATION}/*.bin >/dev/null 2>&1 && mv ${BIN_LOCATION}/*.bin ${MBED}/ && echo -n "Bin updated @ " && date
sleep 1
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment