Skip to content

Instantly share code, notes, and snippets.

@mplewis
Created September 18, 2022 21:16
Show Gist options
  • Save mplewis/493804238a0a9ad32a1afcafa319aa5b to your computer and use it in GitHub Desktop.
Save mplewis/493804238a0a9ad32a1afcafa319aa5b to your computer and use it in GitHub Desktop.
Put this in your path as `shenv` to source .env file variables and run specific commands: `shenv development.env my-command`
#!/bin/bash
set -euo pipefail
set -a; source "$1"; set +a
"${@:2}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment