项目作者: jasperes

项目描述 :
Read a yaml file and create variables in bash
高级语言: Shell
项目地址: git://github.com/jasperes/bash-yaml.git
创建时间: 2017-08-10T03:30:06Z
项目社区:https://github.com/jasperes/bash-yaml

开源协议:MIT License

下载


bash-yaml

Tests
Lint

Bash script to read a Yaml file and create variables.

Working on

  • Linux
  • OSX

Getting Started

Usage

Copy the script/yaml.sh file and import on your script: source yaml.sh

Then two functions are viable:

  • parse_yaml: Output result from the readed yaml file.
  • create_variables: Read and create variables based on yaml file passed by argument.

Look at test folder to see more.

Testing

You can test if your yaml file will be readed correctly based on test folder.

Known issues

  • Object lists must be informed all attributes. Null must be “attr: “.

Credits

This project was started based on @pkuczynski gist. Found it here