Here you go. It needs much more work on checking for errors. Unfortunately I don't think SD errors are catchable so they can't be handled right now.
https://github.com/solworksltd/espruino-self-update
@dave_irvine started
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
Here you go. It needs much more work on checking for errors. Unfortunately I don't think SD errors are catchable so they can't be handled right now.
https://github.com/solworksltd/espruino-self-update