I'm really sorry to the OP if I seemed annoyed, but I was merely stating my first impression.
I'm not a big fan of shell scripts for complicated tasks, but their main benefit is exactly "one file, runs everywhere, it just works" - if you take away all three of those I question if it's the right choice being a shell script. For tools of this scope I really like go. stuff everything together as a static binary and you're good to go.