scripts/*: add missing scripts and cosmetic changes

cherry-pick commit from branch master