replace dest -> ENVIRONMENT for nightly-*.sh