improve compile shell script