write makeconfig.sh to generate config file