script: fix traditional sort

Change-Id: Iac95112c0201c36e6dce783887dbe0dc69ef3c3d