Hi,
I haven't read the script, but obviously it's using commands that don't work on recalbox (i know that tput is not available on recalbox for example). As recalbox uses a minimalistic set of linux commands (called busybox) like an embedded system, some command options are not available.
Anyway you don't beed that device, we have some.power scripts that do the same