The change is almost fine it's but the line should be: if [ -x $SCRIPT ]; then (note the space between the T and the ])
The change is almost fine it's but the line should be:
if [ -x $SCRIPT ]; then
(note the space between the T and the ])