scritps: fix command existence checking and coding style
scritps: fix command existence checking and coding style

startcode/apollo,startcode/apollo,startcode/apollo,startcode/apollo,startcode/apollo,startcode/apollo