From f9aea511631e0ca8c0ccd10739c5cfcf9e4bf4ab Mon Sep 17 00:00:00 2001 From: Alexandre-Silva Date: Thu, 21 Jul 2016 12:07:02 +0100 Subject: [PATCH] mo can now source a script before parsing templates --- .gitignore | 1 + demo/sourcing | 18 ++++++++++++++++++ mo | 11 +++++++++-- 3 files changed, 28 insertions(+), 2 deletions(-) create mode 100755 demo/sourcing diff --git a/.gitignore b/.gitignore index 5a1b4f1..bf77c8f 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,4 @@ diagnostic.test tests/*.diff spec/ spec-runner/ +demo/sourcing.vars diff --git a/demo/sourcing b/demo/sourcing new file mode 100755 index 0000000..01cfb6a --- /dev/null +++ b/demo/sourcing @@ -0,0 +1,18 @@ +#!/bin/bash +# +# This sources a simple script with the env. variables needed for the template. + +cd "$(dirname "$0")" # Go to the script's directory + +cat <sourcing.vars +export NAME="Alex" +export ARRAY=( AAA BBB CCC ) +EOF + +cat <