better https handling, build scripts before copying