Add all files needed to bring up VM and run agaric.com locally
This commit is contained in:
parent
52c8b60bac
commit
4d2bc0ee24
742 changed files with 24037 additions and 0 deletions
14
box/provisioning/docker/parse-yaml.sh
Executable file
14
box/provisioning/docker/parse-yaml.sh
Executable file
|
@ -0,0 +1,14 @@
|
|||
#!/bin/bash
|
||||
#
|
||||
# Parse a YAML file.
|
||||
#
|
||||
# Usage:
|
||||
# parse_yaml [file-path] [variable-to-retrieve]
|
||||
#
|
||||
# Requires ruby.
|
||||
# @see https://coderwall.com/p/bm_tpa/reading-yaml-files-in-bash-with-ruby
|
||||
# @todo Consider using PHP so user doesn't need to install Ruby.
|
||||
|
||||
function parse_yaml {
|
||||
ruby -ryaml -e 'puts ARGV[1..-1].inject(YAML.load(File.read(ARGV[0]))) {|acc, key| acc[key] }' "$@"
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue