generate main script to resources