Refactoring 'micro-osd.sh' script

Change-Id: Ib55f86ac8b70651a9e16b8876da58eefe79e0af1