What happens when an SDcard is inserted?
If your intention is to have your script run each time the card is inserted, or the device is booted, I'd recommend the already mentioned app Tasker, maybe in connection with Scripter. The latter can be used to execute (and manage?) scripts, but AFAIR you can do that part with tasker as well.

You would need to create 1 task (execute your script), and 2 profiles using this task (as there is no possibility for a logical OR with the conditions). One is for the boot_completed event, the other is for the inserted SD-card. That should do it.

In case of trouble (or hard understanding), just comment and I see what I can do :)