Created
December 4, 2023 20:47
-
-
Save casperklein/744355953d6127fcf05a337e19fce4a4 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/bash | |
| [ $# -lt 2 ] && echo "Usage: $0 <env file> <binary> [args]" && exit 1 | |
| # Mark variables which are modified or created for export. | |
| set -a | |
| # source env file | |
| source "$1" | |
| # run binary with arguments | |
| shift | |
| exec "$@" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment