redbadger/website-honestly

View on GitHub
bin/load-ci-env.sh

Summary

Maintainability
Test Coverage
#!/bin/bash

set -euo pipefail

#
# Given an env prefix as $1 (such as PROD or STAGING)
# Look for all env vars that start with this prefix, and export them
# without the prefix.
#

export $(env | grep $1 | sed 's/'$1'_//g')