Added basic support for RPi hardware revisions. Changed to bash to support arrays.