As an update, I noticed https://forum.pedalpcb.com/threads/super-useful-spin-development-script-linux.7871/ in the "similar threads" list when I came back to this, and have completely replaced my script with one I slightly adapted one from that thread. Super useful indeed!