mirror of
https://github.com/tests-always-included/mo.git
synced 2026-04-08 00:40:38 +02:00
Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4c332c9188 | ||
|
|
67ba8bae2c | ||
|
|
1d2617dde1 |
2
API.md
2
API.md
@@ -36,7 +36,7 @@ Display a help message.
|
||||
|
||||
-s=FILE, --source=FILE
|
||||
|
||||
Source a file into the environment before processing template files.
|
||||
Source a file into the environment before processing template files. This can be used multiple times.
|
||||
|
||||
--
|
||||
|
||||
|
||||
2
mo
2
mo
@@ -25,6 +25,7 @@
|
||||
#/ This message.
|
||||
#/ -s=FILE, --source=FILE
|
||||
#/ Load FILE into the environment before processing templates.
|
||||
#/ Can be used multiple times.
|
||||
#
|
||||
# Mo is under a MIT style licence with an additional non-advertising clause.
|
||||
# See LICENSE.md for the full text.
|
||||
@@ -71,6 +72,7 @@
|
||||
# -s=FILE, --source=FILE
|
||||
#
|
||||
# Source a file into the environment before processing template files.
|
||||
# This can be used multiple times.
|
||||
#
|
||||
# --
|
||||
#
|
||||
|
||||
@@ -14,14 +14,15 @@ Simple usage:
|
||||
Options:
|
||||
|
||||
-u, --fail-not-set
|
||||
- Fail upon expansion of an unset variable.
|
||||
Fail upon expansion of an unset variable.
|
||||
-x, --fail-on-function
|
||||
- Fail when a function returns a non-zero status code.
|
||||
Fail when a function returns a non-zero status code.
|
||||
-e, --false
|
||||
- Treat the string "false" as empty for conditionals.
|
||||
Treat the string "false" as empty for conditionals.
|
||||
-h, --help
|
||||
- This message.
|
||||
This message.
|
||||
-s=FILE, --source=FILE
|
||||
- Load FILE into the environment before processing templates.
|
||||
Load FILE into the environment before processing templates.
|
||||
Can be used multiple times.
|
||||
|
||||
MO_VERSION=2.2.0
|
||||
|
||||
2
tests/source-multiple-1.vars
Normal file
2
tests/source-multiple-1.vars
Normal file
@@ -0,0 +1,2 @@
|
||||
export A=from1
|
||||
export B=from1
|
||||
2
tests/source-multiple-2.vars
Normal file
2
tests/source-multiple-2.vars
Normal file
@@ -0,0 +1,2 @@
|
||||
export B=from2
|
||||
export C=from2
|
||||
3
tests/source-multiple.expected
Normal file
3
tests/source-multiple.expected
Normal file
@@ -0,0 +1,3 @@
|
||||
A: from1
|
||||
B: from2
|
||||
C: from2
|
||||
8
tests/source-multiple.sh
Executable file
8
tests/source-multiple.sh
Executable file
@@ -0,0 +1,8 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
cd "${0%/*}" || exit 1
|
||||
cat <<EOF | ../mo --source=source-multiple-1.vars --source=source-multiple-2.vars
|
||||
A: {{A}}
|
||||
B: {{B}}
|
||||
C: {{C}}
|
||||
EOF
|
||||
Reference in New Issue
Block a user