libdot 1.9: Add "@eval" directive to bin/concat.sh

* Add an "@eval" directive which evaluates its operand with bash's eval
  builtin, and appends the result to the concat output.

Change-Id: Ic3d76772688e7de87d8806742cc750c8004452f1
Reviewed-on: https://chromium-review.googlesource.com/201693
Reviewed-by: Robert Ginda <rginda@chromium.org>
Tested-by: Robert Ginda <rginda@chromium.org>
diff --git a/libdot/bin/concat.sh b/libdot/bin/concat.sh
index 96920e0..66a854f 100755
--- a/libdot/bin/concat.sh
+++ b/libdot/bin/concat.sh
@@ -284,6 +284,11 @@
   elif [ "${line:0:6}" = "@echo " ]; then
     append_output "${line:6}"
 
+  elif [ "${line:0:6}" = "@eval " ]; then
+    line=$(eval "${line:6}")
+    insist
+    append_output "$line"
+
   elif [ "${line:0:10}" = "@resource " ]; then
     local name="$(echo "${line:10}" | cut -d' ' -f1)"
     local type="$(echo "${line:10}" | cut -d' ' -f2)"
diff --git a/libdot/doc/changelog.txt b/libdot/doc/changelog.txt
index 3839b99..8a01e67 100644
--- a/libdot/doc/changelog.txt
+++ b/libdot/doc/changelog.txt
@@ -1,3 +1,8 @@
+1.9, 2014-05-27, Add "@eval" directive to bin/concat.sh
+
+* Add an "@eval" directive which evaluates its operand with bash's eval
+  builtin, and appends the result to the concat output.
+
 1.8, 2014-04-05, Remove option parameter from result.pass()
 
 * lib.TestManager.Result.prototype.pass took an optional parameter, a message