[augeas-devel] [PATCH 3 of 5] Add source statements in shell scripts as '.source' nodes
David Lutterkort
dlutter at redhat.com
Fri May 23 17:23:33 UTC 2008
2 files changed, 10 insertions(+), 1 deletion(-)
lenses/shellvars.aug | 8 +++++++-
lenses/tests/test_shellvars.aug | 3 +++
# HG changeset patch
# User David Lutterkort <dlutter at redhat.com>
# Date 1211562969 25200
# Node ID 8fd276da05ac319ece57760da7ce6b21b1b04306
# Parent 4a53de92ffb310d3b6d95d57d8e1b50060847b9b
Add source statements in shell scripts as '.source' nodes
diff -r 4a53de92ffb3 -r 8fd276da05ac lenses/shellvars.aug
--- a/lenses/shellvars.aug Fri May 23 10:16:07 2008 -0700
+++ b/lenses/shellvars.aug Fri May 23 10:16:09 2008 -0700
@@ -12,7 +12,13 @@ module Shellvars =
let kv = [ key key_re . eq . store value . eol ]
- let lns = (comment | kv) *
+ let source =
+ [
+ del /\.|source/ "." . label ".source" .
+ Util.del_ws_spc . store /[^= \t\n]+/ . eol
+ ]
+
+ let lns = (comment | source | kv) *
(* Local Variables: *)
(* mode: caml *)
diff -r 4a53de92ffb3 -r 8fd276da05ac lenses/tests/test_shellvars.aug
--- a/lenses/tests/test_shellvars.aug Fri May 23 10:16:07 2008 -0700
+++ b/lenses/tests/test_shellvars.aug Fri May 23 10:16:09 2008 -0700
@@ -50,6 +50,9 @@ ONBOOT=yes
test Shellvars.lns get "smartd_opts=\"-q never\"\n" =
{ "smartd_opts" = "\"-q never\"" }
+ test Shellvars.lns get ". /etc/java/java.conf\n" =
+ { ".source" = "/etc/java/java.conf" }
+
(* Local Variables: *)
(* mode: caml *)
(* End: *)
More information about the augeas-devel
mailing list