Guest User

Untitled

a guest
Oct 17th, 2017
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.97 KB | None | 0 0
  1. This sets up the environment that the scripts run in. I've found it to be the most flexible route as I don't have to do any complex config file formatting, and the environment becomes the config, which is easy to move around to different platforms (linux, BSD, Heroku, etc). Depending on what I am doing, I might also write a wrapper script that automatically sources the config and runs the script.
  2.  
  3. ```sh
  4. # config.sh
  5. KEY1="value"
  6. KEY2="value"
  7. TOPICAL_KEY3="value"
  8. TOPICAL_KEY4="value"
  9.  
  10. export KEY1 KEY2 TOPICAL_KEY3 TOPICAL_KEY4
  11. ```
  12.  
  13. ```
  14. $ . config.sh
  15. $ bin/myscript.sh
  16. $ bin/myscript.pl
  17. ```
Add Comment
Please, Sign In to add comment