script: fix traditional sort

Change-Id: Icf6364a465aea7c6d59c3e3cac9221ca345c3c08