Skip to content

gost-c/enr

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

enr

Go Report Card Build Status

run cmd with envs

Usage

Download the package and put in any $PATH folder.

before

# touch test.sh
$ echo -e "echo \$HELLO\necho \$WORLD" > test.sh
$ HELLO=test WORLD=bar bash test.sh
# output:
#   test
#   bar

after

enr will load file .env in pwd folder as envs. You can see .env.example

# touch test.sh
$ echo -e "echo \$HELLO\necho \$WORLD" > test.sh
# touch a env folder with our envs
$ echo -e "HELLO=test\nWORLD=bar" > .env
# run cmd start with `enr`
$ enr bash test.sh
# output:
#   test
#   bar

use custom config

$ enr -c="yourCustomConfig" bash test.sh

License

MIT © zcong1993