Skip to content

Instantly share code, notes, and snippets.

@Fyko
Last active May 5, 2023 22:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Fyko/6bb4e995e58a9605eebdab85b749308d to your computer and use it in GitHub Desktop.
Save Fyko/6bb4e995e58a9605eebdab85b749308d to your computer and use it in GitHub Desktop.
#!/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
sudo wget -O /usr/bin/envup https://gist.githubusercontent.com/Fyko/6bb4e995e58a9605eebdab85b749308d/raw/d9e7edbeae7cd76a9eae683c3926dd12b65c8a87/envup.sh
sudo chmod +x /usr/bin/envup
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment