Last active
October 13, 2023 06:10
-
-
Save rafamaciel/7677a3778bdbe645c093170f7b0c364f to your computer and use it in GitHub Desktop.
Use a single variable in place of the default environment variables.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
if [ $# -eq 0 ]; then | |
RUNTIME_ENV="development" | |
else | |
RUNTIME_ENV="$1" | |
fi | |
variaveis=("RAILS_ENV" "NODE_ENV" "GO_ENV" "APP_ENV" "ASPNETCORE_ENVIRONMENT" "MIX_ENV" "FLASK_ENV" "SPRING_PROFILES_ACTIVE" "NODE_ENV" "CONFIGURATION" "BuildConfig.DEBUG" "RUSTFLAGS" "NODE_ENV" "NG_ENV" "REACT_APP_ENV" "FLUTTER_ENVIRONMENT" "AKKA_ENV" "PLACK_ENV" "HASKELL_ENV" "MIX_ENV" "KOTLIN_ENV" "DEBUG" "LISP_ENV") | |
for var in "${variaveis[@]}"; do | |
export $var=$RUNTIME_ENV | |
done | |
echo "Success! RUNTIME_ENV is set to: $RUNTIME_ENV" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment