sudo wget -O /usr/bin/envup https://gist.githubusercontent.com/Fyko/6bb4e995e58a9605eebdab85b749308d/raw/d9e7edbeae7cd76a9eae683c3926dd12b65c8a87/envup.sh
sudo chmod +x /usr/bin/envup
Last active
May 5, 2023 22:25
-
-
Save Fyko/6bb4e995e58a9605eebdab85b749308d to your computer and use it in GitHub Desktop.
This file contains hidden or 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/zsh | |
local file=$([ -z "$1" ] && echo ".env" || echo ".env.$1") | |
if [ -f $file ]; then | |
set -a | |
source $file | |
set +a | |
else | |
echo "No $file file found" 1>&2 | |
return 1 | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment